Upgrade to work with rails 4 and ruby 2.1