     product_photos_gallery_displayed = 'product-photos-gallery-displayed'
 
     reset_product_form = (data) ->
-        $product_form_wrapper.find('form')
-            .replaceWith($('<form />'))
+        $product_form_wrapper.find('form').replaceWith($('<form />'))
         $window.scrollTop($product_form_wrapper)
         update_h2(Mustache.render(templates.stores_h2_add_template, {}))
 
     update_product_form = (data) ->
+        product_form_label_template = templates.product_form_label_template
         $product_form_wrapper.find('form')
-            .replaceWith(Mustache.render(templates.product_form_template, data, {product_form_label_template: templates.product_form_label_template}))
+            .replaceWith(
+                Mustache.render(
+                    templates.product_form_template, data, {
+                        product_form_label_template }))
         $product_form_wrapper.find('form').validate(product_form_options)
         $window.scrollTop($product_form_wrapper)
 
     render_edit_product_form = (data) ->
         if data.rawInstagramTags
-            data.instagram_tags = $.map(data.rawInstagramTags.split(', '), (instagram_tag) ->
-                {value: instagram_tag, name: 'instagram-tag'})
+            data.instagram_tags = $.map(
+                data.rawInstagramTags.split(', '), (instagram_tag) -> {
+                        value: instagram_tag,
+                        name: 'instagram-tag' })
         if data.sizes
             data.sizes = $.map(data.sizes.split(','), (size) ->
                 {value: size, name: 'size'})

                ($ '#product_instagram_tag').val(map_label_values('instagram-tag'))

                verb = if @id is 'new_product' then 'created' else 'updated'
                $.ajax
                    url: ($ @).prop('action')
                    data: ($ @).serialize()
                    type: 'post'
                    success: (response) =>
                        if response.status isnt 'error'
                            expire_alert_and_notice_in(6000)

    window.update_user_photos = (user_photos) ->
        container = $('<div />')
        for user_photo in user_photos.product_photos
            container.append(
                Mustache.render(
                    templates.product_photo_template, user_photo))
        $product_form_wrapper.find('.product-photo:last').after(container)
        ($ '.fetch-more-user-photos').data('maxId', user_photos.max_id)

    window.render_user_photos = (user_photos) ->
        $product_form_wrapper.find('.product-photos')
            .replaceWith(
                Mustache.render(
                    templates.product_photos_template, user_photos, {
                        product_photo: templates.product_photo_template }))

    window.render_user_photo_feed = (user_photos) ->
        $product_form_wrapper.find('.photo-feed')
            .replaceWith(
                Mustache.render(
                    templates.user_photo_feed_template, user_photos, {
                        product_photo: templates.product_photo_template }))

    window.fetch_user_photos = (callback = render_user_photos, options = {}) ->
        $.ajax
