Add functions to create tree grouped by URL.