Replaced std::size_t usages with int