Ruby style fixes and support ruby 2.1.1