Reorganized domain hierarchies by using sealed traits.