Cleaned up documentation with minor code reformatting.