Implemented tree drilldown interaction by clicking on nodes. Refactored D3 tree code to handle dynamic data.