Refactor classes.