Added ThreadManager, removed PHP self-kill