Refactor for datastore in push lib