Adding cloning constructor, changed exitCode API