AFAIKS, dregister and deregisterMap could be put into a single array when array elements is an object containing the target. Minor issue.