PHP Refactor cleanup