Cleanup manager classes
Fix deadlock issues