Added braces to a single-line "if" statement. Also corrected some comments and removed trailing spaces from some statements.