Refactoring after passing first test