Introduced curly braces around if statements to satisfy coding conventions