Make the case/domain mapping more generic