Isn't there a risk that this leaks memory?  Why can't we shut down components in an orderly fashion (e.g. terminating the modules before terminating the connection to homestead)?  If we don't, there's a risk that we'll crash anyway (as the connection to homestead could be destroyed even before the module is deregistered).