Added clone functions (from Shireen).