some progress on getting modules to register and unregister correctly