fix up comments, generate tree file