adding support for consumer_criteria to be optional in case of consumer applicability and minor fixes suggested in the pull request