Tests passing, refactoring needed