Refactor persistance