Implement and test tree initialization and walking