MaintenanceMiddleware implement Contract

Update MaintenanceMiddleware to implement the Middleware contract.