Refactor a bit, no need to expose CML.