A bunch of small style cleanups and docs
clean up XML output a bit