Cleanups to poll_input