Rafactor according to ruby style guide