Make sure that the correct DataDefinition is used consistently by
introducing Model.getInputDefinition() and Model.getOutputDefinition()