More documented code

Large amounts of documentation completed or reformatted.