         element.value = ""
 
   write_target: (buffer, data, callback)->
-    target_name = $(@group_target_selector).attr("name")
+    target_name = $(@selectors.group_target_selector).attr("name")
     if target_name
       @encrypt(buffer, (result_string) ->
         for element in data

    return $(form).serializeArray()

  single_encryption: (form, form_data, callback) ->
    names_to_encrypt = @find_names_for(form, @single_selector)
    defers = []
    @encrypt_requested_fields(form_data, names_to_encrypt, defers)
    $.when.apply($, defers).done(() -> # Spat defers to param list with apply

class this.GPGFormEncryptor
  selectors : {
    form_selector: "form[data-encrypted-form]"
    single_selector: "*[data-encrypt]"
    group_source_selector: "*[data-encrypt-source]"
    group_target_selector: "*[data-encrypt-target]"
  }

  constructor: (armored_key, user_defined_selectors = {}) ->
    $.each(user_defined_selectors, (key, value) =>
      @selectors[key] = value
    )
    @load_key(armored_key)

  setup: ->
    $(@selectors.form_selector).each (index, element) =>
      $(element).submit((e)=>
        @submit_handler(e, element)
      )
