Changed DAO implementation

Changed basic DAO implementation to a Generic DAO.