Convert to C90 and a few tweaks.