made ruby 2.0 compatible

require -> require_relative 
and some minor changes
(+ RubyMine formatting)