directory cleaning improvements