         html = "<li class='dot' data-bracket='none'><span></span></li>"
         $(html).appendTo("#added-goal").bind 'click', (event) ->
           thisReference.dotListener(this)
-        
-      # Now add a dot to the right of the newly added dice
+
       @numberInGoal++
       @numberDots++
       diceFace = DiceFace.toHtml(@resources[index])
       html = "<li class='dice' data-index='" + index + "'><span>#{diceFace}<span></li>"
       html2 = "<li class='dot' data-bracket='none'><span></span></li>"
       $('#notadded-goal li.dice[data-index='+index+']').remove()
+      @cleanUpBrackets()
+
+
+      if($('li.dot:nth-last-child(2)').attr('data-bracket') is 'right')
+        @numberDots--
+        $('li.dot:last-child').remove()
+
+
+
       $(html).appendTo("#added-goal").bind 'click', (event) ->
         thisReference.removeFromGoal($(this).data('index'));
       $(html2).appendTo("#added-goal").bind 'click', (event) ->

    thisReference = this
    resourceList = $('#notadded-goal li.dice')
    resourceList.bind 'click', (event) ->
      thisReference.addToGoal($(this).data('index'));
    $('#sendgoal').bind 'click', (event) ->
      Network.sendGoal(thisReference.createGoalArray())


    $('#added-goal li.dice[data-index='+index+']').remove()
    @cleanUpBrackets()
    $(html).appendTo("#notadded-goal").bind 'click', (event) ->
      thisReference.addDiceToGoal($(this).data('index'));


  cleanUpBrackets: () ->
