refactor persistence setup wizard