clean and refactor in 2 different directories