Refactor to make the store OO