javascript: moved collabjs functionality into dedicated namespaces/scope
javascript: code polishing