Multithreading fixes -- Clean up a few statics.