Fix and refactoring DAO level.