Improved middleware documentation.