     }
     
     var constraintViews: [ConstraintView] = []
-    func addConstraintView(constraintView: ConstraintView, firstInputPort: ConnectorPort?, secondInputPort: ConnectorPort?) {
+    func addConstraintView(constraintView: ConstraintView, firstInputPort: ConnectorPort?, secondInputPort: ConnectorPort?, outputPort: ConnectorPort?) {
         constraintViews.append(constraintView)
         self.scrollView.addSubview(constraintView)
         constraintView.layer.zPosition = constraintZPosition
         updateScrollableSize()
         
+        if let outputPort = outputPort {
+            if let (lastConstraint, inputPort) = self.lastDrawnConstraint {
+                if connectorToLabel[inputPort.connector!] == nil {
+                    self.connectConstraintViews(constraintView, firstConnectorPort: outputPort, secondConstraintView: lastConstraint, secondConnectorPort: inputPort)
+                    
+                    self.lastDrawnConnector = nil
+                }
+            }
+        }
+        
         if let secondInputPort = secondInputPort {
             self.lastDrawnConstraint = (constraintView, secondInputPort)
         } else {
             self.lastDrawnConstraint = nil
         }
+        
         if let firstInputPort = firstInputPort {
             if let lastDrawnConnector = self.lastDrawnConnector {
                 constraintView.connectPort(firstInputPort, connector: lastDrawnConnector.connector)

                    // TODO: Try to actually parse out an equation, instead of just one component
                    let combinedLabels = classifiedLabels.reduce("", +)
                    var recognized = false
                    if let writtenNumber = combinedLabels.toInt() {
                        // We recognized a number!
                        let newConnector = Connector()
                        let newLabel = ConnectorLabel(connector: newConnector)

        }
        self.lastDrawnConnector = nil
    }
    
    func removeConstraintView(constraintView: ConstraintView) {
        if let index = find(constraintViews, constraintView) {
            constraintViews.removeAtIndex(index)
