clean directories and rename