More theme compat work. Better handling of the body classes.