Move single-statement if-then-clauses to separate line so that break-points can be set on the 'then' line. Fix several '{' that were not following the program's conventions.