Refactored to use JDO instead of JPA