Housekeeping

Squash some format string warnings, warnings on 32-bit compiles caused by integer width ambiguity, and misc. whitespace cleanup.