Added working multithreaded curl polling, but it is MESSY.