Changed coffeescript pt over to javascript.