Removed references to 'window' object and converted to module
Changed documentation to JsDoc