Refactorings
Improved test coverage
Formatting