fix up annoying signed/unsigned and mixed type errors
9 files changed