Worked a bit on stage functions and the video2diff.m function