     when "monthly" then o.usuallyPaidSameAmountMonthlyTextExpected
     else o.usuallyPaidSameAmountOtherTextExpected
 
-  legend(usuallyPaidSameAmount).html(textToUse)
-  checked(o.usuallyPaidSameAmountY, false)
-  checked(o.usuallyPaidSameAmountN, false)
-
-onBeenPaidYetY = (ctx) -> #Double -> because it's a function returning a function, which the jQuqery .on function will receive.
+  legend(o.usuallyPaidSameAmount).html(textToUse)
+  checked(o.usuallyPaidSameAmountY, false) if reset
+  checked(o.usuallyPaidSameAmountN, false) if reset
+
+
+hideBeenPaid = (ctx,reset,hideFunction) ->
+  S("beenPaidYetWrap").slideUp 0, -> hideFunction(ctx,reset)
+  S("usuallyPaidSameAmountWrap").slideUp 0
+  S("monthlyPayDayWrap").slideUp 0
+  S("beenPaidYetWrap").slideDown 0
+  S("howOften_wrap").slideUp(0, -> (val ctx.howOftenFrequencyOther, "") if reset)
+
+onBeenPaidYetY = (ctx,reset) -> #Double -> because it's a function returning a function, which the jQuqery .on function will receive.
   ->                      #The first function exists so the returned function has the "context" variable in scope
-    S("beenPaidYetWrap").slideUp 0, -> hideBeenPaidYetWrapOnY(ctx)
+    hideBeenPaid(ctx,reset,hideBeenPaidYetWrapOnY)
+
+onBeenPaidYetN = (ctx,reset) -> #Double -> because it's a function returning a function, which the jQuqery .on function will receive.
+  ->                      #The first function exists so the returned function has the "context" variable in scope
+    hideBeenPaid(ctx,reset,hideBeenPaidYetWrapOnN)
+
+
+#
+#Been Paid Yet function
+#
+
+window.beenPaidYet = (ctx) ->
+  if checked(ctx.beenPaidYetY)
+    onBeenPaidYetY(ctx,false)()
+  else if checked(ctx.beenPaidYetN)
+    onBeenPaidYetN(ctx,false)()
+  else
+    S("beenPaidYetWrap").slideUp 0, -> hideBeenPaidYetWrapOnN(ctx,false)
     S("usuallyPaidSameAmountWrap").slideUp 0
-    S("monthlyPayDayWrap").slideUp 0 if visible ctx.monthlyPayDayWrap
-    S("beenPaidYetWrap").slideDown 0
-    S("howOften_wrap").slideUp(0, -> val ctx.howOftenFrequencyOther , "") if visible ctx.howOften_wrap
-
-onBeenPaidYetN = (ctx) -> #Double -> because it's a function returning a function, which the jQuqery .on function will receive.
-  ->                      #The first function exists so the returned function has the "context" variable in scope
-    S("beenPaidYetWrap").slideUp 0, -> hideBeenPaidYetWrapOnN(ctx)
-    S("usuallyPaidSameAmountWrap").slideUp 0
-    S("monthlyPayDayWrap").slideUp 0 if visible ctx.monthlyPayDayWrap
-    S("beenPaidYetWrap").slideDown 0
-    S("howOften_wrap").slideUp(0, -> val ctx.howOftenFrequencyOther, "") if visible ctx.howOften_wrap
-
-
-#
-#Been Paid Yet function
-#
-
-window.beenPaidYet = (ctx) ->
-  S(ctx.beenPaidYetY).on "click", onBeenPaidYetY(ctx)
-  S(ctx.beenPaidYetN).on "click", onBeenPaidYetN(ctx)
-
-
-
-#
-#Pay Day function
-#
-
-window.payDay = (o) ->
-  S(o.howOftenFrequency).change ->
+    S("monthlyPayDayWrap").slideUp 0
+    S("howOften_wrap").slideUp(0)
+
+  S(ctx.beenPaidYetY).on "click", onBeenPaidYetY(ctx,true)
+  S(ctx.beenPaidYetN).on "click", onBeenPaidYetN(ctx,true)
+
+
+  
+  
+onHowOftenFrequency = (ctx,reset) -> #Double -> because it's a function returning a function, which the jQuqery .on function will receive.
+  ->                           #The first function exists so the returned function has the "context" variable in scope
     if visible("usuallyPaidSameAmountWrap")
       S("usuallyPaidSameAmountWrap").slideUp 0, ->
-        checked(o.usuallyPaidSameAmountY,false)
-        checked(o.usuallyPaidSameAmountN,false)
-
-    S("monthlyPayDayWrap").slideUp 0, -> val(o.monthlyPayDay,"") if visible("monthlyPayDayWrap")
-
-    if not (val(o.howOftenFrequency) is o.defaultValue or val(o.howOftenFrequency) is "")
-      if checked(o.beenPaidYetN)
-        textToUse = switch (val(o.howOftenFrequency))
-          when "weekly" then o.usuallyPaidSameAmountWeeklyTextExpected
-          when "fortnightly" then o.usuallyPaidSameAmountFortnightlyTextExpected
-          when "fourweekly" then o.usuallyPaidSameAmountFourWeeklyTextExpected
-          when "monthly" then o.usuallyPaidSameAmountMonthlyTextExpected
-          else o.usuallyPaidSameAmountOtherTextExpected
-        legend(o.usuallyPaidSameAmount).html(textToUse)
-          
-      if checked(o.beenPaidYetY)
-        textToUse = switch (val(o.howOftenFrequency))
-          when "weekly" then o.usuallyPaidSameAmountWeeklyText
-          when "fortnightly" then o.usuallyPaidSameAmountFortnightlyText
-          when "fourweekly" then o.usuallyPaidSameAmountFourWeeklyText
-          when "monthly" then o.usuallyPaidSameAmountMonthlyText
-          else o.usuallyPaidSameAmountOtherText
-        legend(o.usuallyPaidSameAmount).html(textToUse)
-
-      checked(o.usuallyPaidSameAmountY, false)
-      checked(o.usuallyPaidSameAmountN, false)
+        checked(ctx.usuallyPaidSameAmountY,false) if reset
+        checked(ctx.usuallyPaidSameAmountN,false) if reset
+
+    S("monthlyPayDayWrap").slideUp 0, -> val(ctx.monthlyPayDay,"") if visible("monthlyPayDayWrap") and reset
+
+    if not (val(ctx.howOftenFrequency) is ctx.defaultValue or val(ctx.howOftenFrequency) is "")
+      if checked(ctx.beenPaidYetN)
+        textToUse = switch (val(ctx.howOftenFrequency))
+          when "weekly" then ctx.usuallyPaidSameAmountWeeklyTextExpected
+          when "fortnightly" then ctx.usuallyPaidSameAmountFortnightlyTextExpected
+          when "fourweekly" then ctx.usuallyPaidSameAmountFourWeeklyTextExpected
+          when "monthly" then ctx.usuallyPaidSameAmountMonthlyTextExpected
+          else ctx.usuallyPaidSameAmountOtherTextExpected
+        legend(ctx.usuallyPaidSameAmount).html(textToUse)
+
+      if checked(ctx.beenPaidYetY)
+        textToUse = switch (val(ctx.howOftenFrequency))
+          when "weekly" then ctx.usuallyPaidSameAmountWeeklyText
+          when "fortnightly" then ctx.usuallyPaidSameAmountFortnightlyText
+          when "fourweekly" then ctx.usuallyPaidSameAmountFourWeeklyText
+          when "monthly" then ctx.usuallyPaidSameAmountMonthlyText
+          else ctx.usuallyPaidSameAmountOtherText
+        legend(ctx.usuallyPaidSameAmount).html(textToUse)
+
+      checked(ctx.usuallyPaidSameAmountY, false) if reset
+      checked(ctx.usuallyPaidSameAmountN, false) if reset
       S("usuallyPaidSameAmountWrap").slideDown(0)
 
 
-    S("monthlyPayDayWrap").slideDown(0) if val(o.howOftenFrequency) is "monthly"
+    S("monthlyPayDayWrap").slideDown(0) if val(ctx.howOftenFrequency) is "monthly"
+
+#
+#Pay Day function
+#
+
+window.payDay = (o) ->
+  onHowOftenFrequency(o,false)()
+  S(o.howOftenFrequency).on "change", onHowOftenFrequency(o,true)
 
 #
 # What For function
 #
 
 window.whatFor = (payIntoPensionY, payIntoPensionN, whatFor) ->
+  if not checked(payIntoPensionY)
+    S("whatForWrap").slideUp 0, -> val(whatFor,"")
   S(payIntoPensionY).on "click", -> S("whatForWrap").slideDown 0
 
   S(payIntoPensionN).on "click", -> S("whatForWrap").slideUp 0, -> val(whatFor,"")

    when "monthly" then o.usuallyPaidSameAmountMonthlyText
    else o.usuallyPaidSameAmountOtherText

  legend(usuallyPaidSameAmount).html(textToUse)
  checked(o.usuallyPaidSameAmountY, false)
  checked(o.usuallyPaidSameAmountN, false)

hideBeenPaidYetWrapOnN = (o) ->
  label(o.howMuchPaid).text(o.howMuchPaidNText)
  val(o.howMuchPaid,"")
  legend(o.whatDatePaid).html(o.whatDatePaidNText)
  val(o.whatDatePaidDay,"")
  val(o.whatDatePaidMonth,"")
  val(o.whatDatePaidYear,"")
  label(o.howOften).text(o.howOftenNText)
  val(o.howOften,"")
  label(o.monthlyPayDay).text(o.monthlyPayDayNText)
  val(o.monthlyPayDay,"")
  textToUse = switch (val(o.howOften))
    when "weekly" then o.usuallyPaidSameAmountWeeklyTextExpected
    when "fortnightly" then o.usuallyPaidSameAmountFortnightlyTextExpected

# What Costs function
#
window.whatCosts = (careCostsForThisWorkY, careCostsForThisWorkN, whatCosts) ->
  if not checked(careCostsForThisWorkY)
    S("whatCostsWrap").slideUp 0, -> val(whatCosts,"")

  S(careCostsForThisWorkY).on "click", -> S("whatCostsWrap").slideDown 0

  S(careCostsForThisWorkN).on "click", -> S("whatCostsWrap").slideUp 0, -> val(whatCosts,"")
