if block braces and other style issues