Added ability to add per-handler middleware
All tests pass