Refactor DAO classes and services