Publish subscribe implementation in CoffeeScript