Code cleanup and whitespace fix.