moves all poll related functions to poll.php