code cleaning for classes.