Domains in the matrix refactored