Simplifying VidAnalytics JS