Changed over to coffeescript