Refactor DAO in directory, and to account for different models