Removed thread_cleanup, not needed. manager function turned into class, used for scoping and executing code in a contained environment.