Refactoring after learning more Ruby.