tweaks: rearrange and reindent some lines in the painting routines

Also adjust a few comments.
1 file changed