Switch to C99. (It’s 2014!)
Removed some dead code and slightly clarified some to make Clang Analyzer happy