#1966: fixed various problems: bugs in cloning, bugs in persistence, method names, various minor improvements of source code for readability.