Refactoring after tests