Added adding classes per node. Auto add leaf class to leaves.