Refactor and break out into a new class for store and retreval