Updated DAO, some fixes in DB scheme.