Changed all size_t variables to uint32_t