Added Deregister functionality.