Added template cloning capability