Changing logic on unregister, cleaning up some logging