Converted main file from JavaScript to CoffeeScript.