Small, general code cleanup 

Removed dead code, improved alignment, fixed warnings, and cleaned up `DumpTGA()`.
Not that it really mattered, but I'm not sure if there's much of a point in artificially limiting the maximum width and height to `short`.