Fix prepareForTemplating function to correctly produce a clean video model.