use constant for number of coordinates to draw a line.
implement toLinesArray, issue #78
simplify code, issue #78
check if iterator exists
cleanup whitespace