Remove unused middlewares