Modified to allow only classes.