Implemented bidirectional tree navigation. Handles the special case of a single child, which is not handled properly by D3's tree layout algorithm