what role did middleware play before? does it need removing in this ticket? (I don't see code that is affected by this removal, so I'd rather not chance an accidental dependency-removal to fix a completely different issue. Good for a quick-ticket new issue)