Hibernate + DAO changes (Cleaned up verson)

Hi Oz, here's the cleaned up version with the comments removed.