Copious hacking to try and get CoffeeScript working. Gonna have to come back to this...