Moved logic that matches names of stores into the model.