General cleanup and whitespace changes