Adding some basic middleware, along with a registry to allow retreiving specific middleware.