Added color algorithm selector + leaf colors from code size
merged in other changes
more merging.