Removed all thread_local singletons, replacing them with explicitly
passing in the "singleton" whereever it's needed.