Refactor store to use promises.