Split up mesh into multiple classes.