Clean up whitespace

Blocks of code are separated variously by one, two or three empty lines. Stick to one empty line for uniformity.