Converted javascript to coffeescript

because coffeescript is dope