Merge two classes, fixed clone bug, fixed loop bug, final version 1.0