cleanup and renaming some classes.