Performance DAO improvements and refactoring