removing unused middleware