Reorganize Unregister to be more readable