Completed the walk function and added tests for inorder, preorder and postorder traversal