Refactor according to Ruby style guide.