clean out some middleware