I think your question may be in the wrong forum. How long for all of the metabolites to be eliminated from the body is probably a medical question.
As to having "clean" tests, you should ask your attorney the importance IN YOUR situation that tests be "clean". Does your P/officer know you smoke? Does he or she have a problem with your smoking?
It's true that tests can detect traces of marijuana in your system long after you've stopped smoking... and it's also possible, through a series of tests, to tell whether you're STILL smoking.
That's because the residual levels of the components of THC -- known as metabolites -- are eliminated through urine over time. Some metabolites are the psychoactive components that actually get you high... and others are inactive, which hang around in your system to show that you used it sometime in the past.
Generally, the lab would expect to see decreasing levels of THC metabolites over time. If you suddenly get a spike in metabolite levels, or the ratio of psychoactive metabolites suddenly increases compared to the level of inactive metabolites, that's a pretty good sign you have used recently.
I would ask your lawyer whether you should disclose your marijuana use history prior to the first test, so the lab can track future tests for the expected decline of metabolites.