Main code rev. 1715

Fixed "delete" option. Added "clone" option.