First attempt at tree formatter, not working yet