Some general utilities cleanup.
Recommit needed middleware—my bad.