Refactoring common code of slab and wall to a base class and fixed pattern handling with new geometries.