Switched to stdint types and some coding style cleanups.