 
 $ ->
   $('#submit').click ->
-    l = Ladda.create(this)
-    l.start()
+    ladda = Ladda.create(this)
+    ladda.start()
     username = $('#username').val().trim()
     numberOfArtists = $('#number-of-artists option:selected').val()
     timeframe = $('#timeframe option:selected').val()

            if key != 'error'
              weeklyCharts[key] = value
        drawChart(weeklyCharts, numberOfArtists, cumulative)
        l.stop()
        $('.collapse').collapse()

        when 'last-12-months' then toDate.clone().subtract(12, 'month')
        when 'overall'        then moment.utc(info.registered * 1000)

      ranges = spanRange(fromDate, toDate, 1, 'week')
      progress = 0
      Promise.map ranges, (range) ->
        [fromDate, toDate] = range
        params = {username, fromDate, toDate}
        $.getJSON($SCRIPT_ROOT + '/weekly-artist-charts', params)
        .then (weeklyCharts) ->
          progress += 1
          ladda.setProgress(progress / ranges.length)
          # if weeklyCharts.error?
          #   # Put error handling here
          weeklyCharts
        .fail ->
          # Failed to get weekly charts.
          ladda.stop()
      .then (weeks) ->
        weeklyCharts = {}
        for week in weeks
