More unsigned signed warning fixes

Applying more fixes towards issue #735. I made each of the commits here so that it was limited to just the area being fixed. I left the commits unsquashed so the changes can be seen in isolation.

There are still a few warnings of this type remaining but they are going to stretch across a wider area when fixed.