Refactor walker, add tests, fix bugs.