reformat all code for root tools, make it easier to read