Cleaning up and renaming of some internals.