Refactor some classes.