refactor: move DAO implementation into its function package.