Add new tree walk implementations and fix a palindrome bug