Working on debugging the tree, currently looks mostly right, just some errors in splitting I think