Fixed some bugs
Refactored the VideoStack class to be more performant when iterating
over it