php-cs-fixer and some refactors