General comment: this module is now a little weird. It should probably be mostly migrated into `std::string` I guess.