Cleaned up doc formatting and typos, comments, and whitespace