faster polyline draw with clipping
cleanup duplicated code.
Rewrite Progress Dialog
TTY Port, need to be tested...