Code cleanup and renaming.