book persistence refactor