tree printer
clean up tree print
ugliest fix for type erasure
optimize imports