refactored lots of code using RubyMine syntax tool