doc: various formatting improvements.
resolved merge conflicts.