code refactored and jsdoc added, moved userAgent string page into demo folder