       .takeWhen(
         Signal.merge(
           self.emailTextFieldReturnProperty.signal,
-          self.emailTextFieldDoneEditingProperty.signal
-          )
-        )
+          self.emailTextFieldDoneEditingProperty.signal))
       .filter(isFalse)
       .map { _ in
         localizedString(
           // Add to native strings.
           key: "signup.error.email_invalid",
-          defaultValue: "Oof! The email you entered isn't valid."
-        )
+          defaultValue: "Oof! The email you entered isn't valid.")
       }
 
     let signupError = signupEvent.errors()
       .map {
         $0.errorMessages.first ??
           localizedString(key: "signup.error.something_wrong", defaultValue: "Something went wrong.")
-      }
+    }
 
     self.showError = Signal.merge(emailError, signupError)
 

      }
      .skipRepeats()

    let signupEvent = combineLatest(
      Signal.merge(
        self.nameChangedProperty.signal,
        self.viewDidLoadProperty.signal.mapConst("")
        ),
      Signal.merge(
        self.emailChangedProperty.signal,
        self.viewDidLoadProperty.signal.mapConst("")
        ),
      Signal.merge(
        self.passwordChangedProperty.signal,
        self.viewDidLoadProperty.signal.mapConst("")
        ),
      Signal.merge(
        self.setWeeklyNewsletterState,
        self.weeklyNewsletterChangedProperty.signal.ignoreNil()
        )
      )
      .takeWhen(
        Signal.merge(
          passwordTextFieldReturnProperty.signal,
          signupButtonPressedProperty.signal
          )
      )
      .switchMap { name, email, password, newsletter in
        AppEnvironment.current.apiService.signup(
          name: name,
          email: email,
          password: password,
          passwordConfirmation: password,
          sendNewsletters: newsletter
          )
          .delay(AppEnvironment.current.apiDelayInterval, onScheduler: AppEnvironment.current.scheduler)
          .materialize()
      }

  public init() {
    let nameIsValid = Signal.merge(
      self.viewDidLoadProperty.signal.mapConst(false),
      self.nameChangedProperty.signal.map { !$0.isEmpty })

    let emailIsValid = Signal.merge(
      self.viewDidLoadProperty.signal.mapConst(false),
      self.emailChangedProperty.signal.map { isValidEmail($0) })

    let passwordIsValid = Signal.merge(
      self.viewDidLoadProperty.signal.mapConst(false),
      self.passwordChangedProperty.signal.map { !$0.isEmpty })

    self.nameTextFieldBecomeFirstResponder = self.viewDidLoadProperty.signal.ignoreValues()
    self.emailTextFieldBecomeFirstResponder = self.nameTextFieldReturnProperty.signal
    self.passwordTextFieldBecomeFirstResponder = self.emailTextFieldReturnProperty.signal

    self.isSignupButtonEnabled = combineLatest(nameIsValid, emailIsValid, passwordIsValid)
      .map { name, email, password in
