Refactored CoffeeScript for wolf.js