Some minor cleanups, organization and renaming.