Added an optional render argument to as_trees that if true causes it to render the rows before building the tree