Changed enums to case classes.