Removed debug code
Changed code to use clone instead of deepcopy