Fix Requires of video.js and make use of it so that videos will play.

Also refactoring of video.js code