Added preorder and postorder traversal.