Add intelligent cleaning to build.