Replaced javascript implementations with coffeescript.