directory renaming and cleanup