Changed how threading was setup, now uses a queue