Replace all features with new thread-safe code; still need to test on Linux