More tidying up of browser requirement touching code, plus misc code cleanups