jkitzes credit

@jkitzes @wking please review.

I cleaned up the whitespace while I was doing the commit.