Updated the ORM and pubsub hooks to allow them to be reloaded at runtime.