Some cleanup and renaming.