cleanup and trimdown