Changed rectangles into a 1D array. Changed rectangle drawing so the rectangle gets drawn AFTER all the points have been drawn.
See previous commit message