Refine and test register/unregister methods.