Middleware removal