Updated test code to find and remove duplicate keyframes on the fly. Also added code to mark duplicates as it finds them.