Update and rename generator.js to poll.js