Close-to-complete organization of the hooks refactoring, with tested pubsub/io being the glaring omission.