moving functions from avl class to node struct, re=writting how adding
nodes is handled