Completed binary tree exercise.