Missing braces on all of the added if() statements. Indention is confusing on the next three.