Fix tree to text function and make it non recursive
Simplify tree display code
Fix sorting by memory usage, IO rate, or name