Add more comments and rename some classes.