updated and cleaned optical flow script