Fix unsigned/signed comparison.
Fix unsigned/signed warning.
Fix signed/unsigned warning.
Merge pull request #1329 from carsonmcdonald/unsignedsignedfix2

Unsigned signed warning fixes