Refactored several poll functions to work properly