Moved loop dom utils to its own module.