These should all be size_t

We were comparing size_t with all sorts of things that could have
caused random errors
Fix -Wshadow warnings