Update for style and simplicity
Use parens instead of braces; everything should be stdc11 compliant