Replaced unsigned int with std::size_t for array indices/sizes