Remove duplicite class and move method to the right class.
Tweak legend colors.
Make computation more precise in material region.
Fix result generation.