This file could use a little love from RubyMine's refactor function