Updated PR incorporating the middleware overview and comments