added iter_tree(), merge_objects() and document_to_poly(). changed name of a few functions.