     let xConnector: Connector
     let yConnector: Connector
     
+    let gridLineView: GridLineView
+    let functionLayer: CAShapeLayer
+    let selectedPointLayer: CAShapeLayer
+    
     init(xConnector: Connector, yConnector: Connector) {
         self.xConnector = xConnector
         self.yConnector = yConnector
         
+        gridLineView = GridLineView(frame: CGRect.zero)
+        functionLayer = CAShapeLayer()
+        selectedPointLayer = CAShapeLayer()
+        
         super.init(frame: CGRect.zero)
+        
+        self.addSubview(gridLineView)
+        gridLineView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+        
+        functionLayer.strokeColor = GraphToy.yColor.cgColor
+        functionLayer.fillColor = nil
+        functionLayer.lineCap = "round"
+        functionLayer.lineWidth = 4
+        self.layer.addSublayer(functionLayer)
+        
+        selectedPointLayer.fillColor = GraphToy.xColor.cgColor
+        self.layer.addSublayer(selectedPointLayer)
+        
+        self.clipsToBounds = true
     }
     
     required init(coder aDecoder: NSCoder) {

        // Flip the y axis
        transform = transform.scaledBy(x: 1, y: -1)
        transform = transform.translatedBy(x: 0, y: -bounds.size.height)

        return transform
    }
    
    static let xColor = UIColor.multiplierInputColor()
    static let yColor = UIColor.adderInputColor()
    
    override func draw(_ rect: CGRect) {
        // Draw a grid in the background
        let mainColor = UIColor.exponentBaseColor();
        let backgroundColor = mainColor.withAlphaComponent(0.1).cgColor
        let minorAxisColor = mainColor.withAlphaComponent(0.2).cgColor
        let majorAxisColor = mainColor.cgColor
        let functionLineColor = GraphToy.yColor.cgColor
        let majorAxisWidth: CGFloat = 2
        let minorAxisWidth: CGFloat = 1
        let functionLineWidth: CGFloat = 4
        let selectedPointRadius: CGFloat = 7
        
        let context = UIGraphicsGetCurrentContext()!
        func stroke(path: CGMutablePath, width: CGFloat, color: CGColor) {

            context.addPath(path)
            context.strokePath()
        }
        
        context.setFillColor(UIColor.white.cgColor)
        context.fill(self.bounds)
