instance_dao: some code clenaup