Updated middleware documentation