JPA code cleanup