A few type changes to address signed/unsigned mismatch warnings.