Added jQuery and made some minor changes in CoffeeScript