Removing the unnecessary directories