Added the ThreadRegistry helper class