Rewriting js to coffeescript with turbolinks compatibility

[#207]