Refactoring and adding phpunit configuration