Move shared logic to category classes.