Refactor stubs and tests
Update composer.json
Add code coverage badge to readme