Extend survey generation prototype, converting to CoffeeScript