Cleaned up video wrapper code

Cleand up some things that could go wrong.