Implement model persistence