improvements, copy semantics bug fixing in the test script
(#352)