tree nodes are now allocated properly
bug removed. the only thing to do now (i think) is to make empty parent nodes remove too
proper deletion of SDL window