Changed the Poller class to use the new create_hosts function