Run uncrustify on this mess. There's a few small oddities (especially in enums), but this is much better.