A number of "int"s turned into "size_t"s or "unsigned int"s to prevent strange or nonsensical results