Extract methods.
Refactor to comprehension style.
Use do syntax.