Improving doc
Adding middleware implementation