some code cleanup in EnumChoice and Select