Updated documentation; added ability to configure default options for middleware (particularly useful in Rails).