s/unsigned long/uint32_t/g + cleanings