Changed `data-role="main"` HTML attribute to `role="main"`
Added check for existence of browser