Huge refactor of type and channel registries to mutualize code