Refactor of ui-main, which now also disallows scroll on overflow: hidden