F/persist refactor and libtest