DAO for cirrus metadata + refactoring