Improve tree data structure

( *( +( 3)( 4))( 5))
changes to
( *( +(num 3)(num 4))(num 5))