Clean up modules.
Handle non-recursive clone.