Extract persistence layer to its own file in preperation for refactoring to different DB
Fix documentation typo