Add "use strict", add "ws" as a var, add "window" prefix for Web Socket Object

"Use strict" + some other, minor updates