Some more DAO refactoring.