 import NightscouterKit
 import ReactiveCocoa
 
-protocol FormViewControllerDelegate {
-    func formViewControllerDidCancel(viewController: FormViewController)
-    func formViewControllerDidCreateSite(site: Site, viewController: FormViewController)
-}
-
 class FormViewController: UIViewController, UITextFieldDelegate, UINavigationControllerDelegate {
     
     @IBOutlet private weak var formLabel: UILabel!

                        .retry(2)
                        .flatMapError { error in
                            // print("Network error occurred: \(error)")
                            
                            // Is there a way to alway pass a bool down to subscribers?
                            NSOperationQueue.mainQueue().addOperationWithBlock({ () -> Void in
                                self.nextButton.enabled = false
                            })
                            return SignalProducer.empty
                    }
                    
                } catch let error {
                    
                    print("Error validating URL: \(error)")
                    // Is there a way to alway pass a bool down to subscribers?
                    self.nextButton.enabled = false
                    return SignalProducer.empty
                }
                
            }
            .map { (data, URLResponse) -> String? in
                // URL Responded - Check Status Code
                if let urlResponse = URLResponse as? NSHTTPURLResponse
                {
                    if ((urlResponse.statusCode >= 200 && urlResponse.statusCode < 400) || urlResponse.statusCode == 405) // 200-399 = Valid Responses, 405 = Valid Response (Weird Response on some valid URLs)
                    {
                        return urlResponse.URL?.absoluteString
                    }
                    else // Error
                    {
                        return nil
                    }
                }
                return nil
            }
            .observeOn(UIScheduler())
        

    
    override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {
        currentOrientation = UIDevice.currentDevice().orientation
    }
    
    deinit {
