Clean up document classes.