Fixes a number of "comparison between signed and unsigned" warnings.
Merge pull request #786 from carsonmcdonald/unsignedfixes

Fixes a number of "comparison between signed and unsigned" warnings.