More domain stuff and fixing classes.

I should really be doing these fixes in Master.