More consolidation and simplification in the middleware.  Still need to add a unit test that switches context to a child/extra property on an api request.