Extracted persistence logic into module