Using HSL color space to ensure group colors don't clash. Tidied tree generation further.