Minnor changes ReferreDAOImpl and tests