             
             let point0 = CGPointFromString(pointStr0)
             let point1 = CGPointFromString(pointStr1)
-            drawLineFrom(point0, toPoint: point1, properties: properties)
-        }
-        mergeViews()
+            self.drawLineFrom(point0, toPoint: point1, properties: properties)
+        }
+        self.mergeViews()
     }
     
     /// draws a line from one point to another with certain properties

        
        CGContextStrokePath(context)
        
        tempImageView.image?.drawInRect(tempImageView.frame)
        let image = UIGraphicsGetImageFromCurrentImageContext()
        tempImageView.image = image
        tempImageView.alpha = properties.color.alpha
        UIGraphicsEndImageContext()
    }
    
    /// exports the current drawing
    public func exportDrawing() -> UIImage {
        UIGraphicsBeginImageContext(mainImageView.bounds.size)
        mainImageView.image?.drawInRect(mainImageView.frame)
        let image = UIGraphicsGetImageFromCurrentImageContext()
        UIGraphicsEndImageContext()
        return image

            // Draw the one point
            let pointStr = array[0] 
            let point = CGPointFromString(pointStr)
            self.drawLineFrom(point, toPoint: point, properties: properties)
        }
        
        for i in 0 ..< array.count - 1 {
