move resultsUrl and pollCount out of config into the closure