Refactor video record