Solve some code warnings.
Complete the DAO class.