Translate javascripts to coffeescripts