Added thin service factory. Also split the DOM methods into a new namespace.