Reorganize CL calls to start copying during data preparation.
Code refactoring.