Fix variable-shadowing warning that's new in VC14
Fix wrong loop bound in makematrix()
uint -> int almost everywhere
- A Twitter conversation convinced me that uints are dangerous due to underflow on subtraction.  Changing my bad habit of using uints all over the place for values that should be non-negative.
Merge branch 'master' into vc14