Refactoring Spring and Hibernate