Fix a subset of size_t related issues and remove an unused parameter.