Chat with no RequireJS

Wrapped all JavaScripts except AngularJS modules into anonymous functions to have the global scope clean. Guy's fixes of black screen on monitors also applied.
JavaScript doesn't have default parameters, yes it initializes window.chat to be an empty module object and then the anonymous function adds public and private functions to it.

This way you have proper isolation - you pass what objects the module should work with and it doesn't pollute the global scope since it is wrapped by the anonymous function.