Review fixes
* Cleanup unused variables and old middleware support r=adrian
* Fix tuple syntax r=peterbe