(BROKEN) Committing after huge change to thread code (doesn't compile)