restructured the optical flow formular wo avoid realculating big parts of the formulat twice!
NOTE: benchmarked this and it turns out matlab seems to optimize stuff like this - there's no time improvement, but this is still nicer to read