Refactored code and started to write tests
Fixed composer configuration