update output to conform to spec + style fixes
fix incorrect interpretation of units that looks like they have a prefix