grammar and minor whitespace fixes to the program structure chapter
fixed bad spelling of "thoroughly" throughout the docs