Changed ImageHtml toplevel to use dom objects directly