Don't half-ass the uint transision.

Use %lu instead of %ld with printf()s, and where applicable, transision
to uns. long int for variables.
More uint variable changes.