Use uint16_t and friends where appropriate (trivial).