Factor out Enum baseclass