Added rewrite middleware and one method.

Right, I also prefer explicitness here.