Converting gremlin.coffee and app.coffee to javascript