Updated middleware to inherit from a base type and added markdown server