collapsing unnecessary scopes, changes to the interface
splitting the middleware in two