Refactoring, added code coverage report for phpunit