Refactored the iteration over videos to be more intuitive (and hopefully
less error-prone)
Added Video class that represents a stack of images