Code refactoring in CreatePoll; cleanup