Replace class variables with constants or instance variables
Remove nested ternary operators
Avoid using rescue in its modifier form