Refactored JPA methods
Moved file utility methods to separate class