More efficient handling of classes.