Remove non-essential middlewares