Use our types instead of int/uint32_t in a few places