Clean up if statement and blank lines after comments

Refs #2970