Add clone functionality and update test suite.