Added middleware discussion, documentation and demonstration