Jeremy Newman : remove unused funcs and fix for PHP 7.2