Edited for CoffeeScript / Node.js