Ported to CoffeeScript. Old JS file remains as well, though.