get rid of middleware_pack

* rename whatever was left of it to middleware
* don't create a separate module for it