Code cleanup and style changes.