Fixing open brace and consistent IF statement formatting