   return
 
 $("#js-quick-highlight").click ->
-  if $("#js-quick-highlight").is(":checked")
-    VA.quickHighlight = true
-  else
-    VA.quickHighlight = false
+  VA.quickHighlight = $("#js-quick-highlight").is(":checked")
   return
 
 $("#js-quick-compare").click ->
-  if $("#js-quick-compare").is(":checked")
-    VA.quickCompare = true
-  else
-    VA.quickCompare = false
+  VA.quickCompare = $("#js-quick-compare").is(":checked")
   return
 
 $(".js-show-sort").click (e) ->

      @ctx.fillStyle = @colors.insert
      @drawIndex(step.i)
      setTimeout =>
        if step.i < step.j
          [@animationValues[step.j], @animationValues[step.i...step.j]] = [@animationValues[step.i], @animationValues[step.i+1..step.j]]
          [@animationIndices[step.j], @animationIndices[step.i...step.j]] = [@animationIndices[step.i], @animationIndices[step.i+1..step.j]]
        else
          [@animationValues[step.j], @animationValues[step.j+1..step.i]] = [@animationValues[step.i], @animationValues[step.j...step.i]]
          [@animationIndices[step.j], @animationIndices[step.j+1..step.i]] = [@animationIndices[step.i], @animationIndices[step.j...step.i]]
        @redraw()
        @ctx.fillStyle = @colors.slide
        for x in slideRange

      [@indices[i], @indices[j]] = [@indices[j], @indices[i]]

  sort: =>
    @values.sort (a, b) => a - b
    @indices.sort (a, b) => a - b

  reverse: =>
    @values.reverse()
    @indices.reverse()

  animationQueuePush: (dict) =>
    dict.swaps = @swaps
