Factor out Consumer class