Converted frontend scripts to CoffeeScript