Refactor, move helpers for video playback