A spot of refactoring

Use the power of CoffeeScript classes!