Fixed deregister error and added comments.
Teleporter merge.