added polygonal line support in drawing tree; some other improvements