Move to JPA for easier testing