refactor some classes.