better transparency handling for SpectrumGraph
cleaning the code