tidy up tree html