Basic implementation of defregistry macro to define a registry and its functions to register handlers and trigger handlers.