Refactored the code to use coffeeScript instead of javascript