Refactored DAO and Resource dependency