Rewrote js to coffeescript ... doh