Copied 340-grocery-store from solutions.
Refactored away from model methods.