Redesigned to be able to use different kinds of stores.