Update to rails 4 and ruby 2.1
Clean up javascript