Fixed memory leak in toList

Other changes:
inorderWithoutRecursion
TODO: inorderMorris