Started middleware implementation.