Tighten types. Unsigned int to size_t, char to {u}int8_t, etc. Fix formatting.