Refactors appJS to use coffeescript