Generating tuples as nodes, increasing number of nodes generated, updated sort code to handle tuples.