Add PHPCS configuration and clean some code to match standard