Code cleanup and beautify.