Refactor Poller class