Additional flexibility for middlewares

- Middlewares can be passed parameters
- You can just supply blocks as middlewares