Redefining REF_DOMAIN and UNIT_SQUARE