Move cloning code into poller.py