fixed code used for updating pyvideo records and cleaned up a little