Format cleanup

Contains changes in #47 plus some others that clean up the attributes (and elements) generated for HTML and some conversions back to CNXML