Code cleanup and formatting.