Fix some startup bugs, it now sets up the dom classes.