MaintenanceMiddleware contract

Update MaintenanceMiddleware to implement the Middleware contract.