Changing the directories and cleaning