Added recursive data structure to represent triple tree