Refactoring PHP classes.