Fixed some bugs and made the drawTree function even worse:)