Fix for enumerable model types and refactored duplicate code used by ToOperation and CreateModelProperty