 window.reset_product_form = (data) ->
-    ($ '#product_form_wrapper').find('form')
+    $product_form_wrapper.find('form')
         .replaceWith($('<form />'))
-    ($ window).scrollTop(($ '#product_form_wrapper'))
+    $window.scrollTop($product_form_wrapper)
     update_h2(Mustache.render(templates.stores_h2_add_template, {}))
 
 window.update_product_form = (data) ->
-    ($ '#product_form_wrapper')
-        .find('form').replaceWith(Mustache.render(templates.product_form_template, data, {product_form_label_template: templates.product_form_label_template}))
-    ($ '#product_form_wrapper').find('form').validate(product_form_options)
-    ($ window).scrollTop(($ '#product_form_wrapper'))
+    $product_form_wrapper.find('form')
+        .replaceWith(Mustache.render(templates.product_form_template, data, {product_form_label_template: templates.product_form_label_template}))
+    $product_form_wrapper.find('form').validate(product_form_options)
+    $window.scrollTop($product_form_wrapper)
 
 window.render_edit_product_form = (data) ->
     if data.rawInstagramTags

        ($ '#product_count').text("#{product_count} Products")

    render_product_widgets = (product_widgets) ->
        if product_widgets.length == 0
            ($ '.product-widgets').empty()
        else
            $wrapper = $('<div/>')

    destroy_product = (store_slug, product_slug, callback) ->
        $.ajax
            url: "/products/#{product_slug}"
            data: {store_slug, product_slug}
            type: 'delete'
            success: (response) ->
                if response.status is 'success'
