Improved Douglas-Peucker and it's visualisator's code.