Make logDom a stand alone, plus related fix ups and some clean ups.