Add ability to configure middleware
Add tests for configuring middleware
Add some documentation about configuring middleware