Refactored project and included more tests