Added frame-to-frame comparison code