Added a manager class, and auto registration for threads.