Refactor some code, remove some phpdoc, phpcs update