I moved all the variables whose scope is within the showPlayer suite. I'm not able to move those variables that are used by video.js as when I do there are 'undeclared variable' errors.