       # Need to store this rather than data.location in order to be able to
       # delete the highlight at a later date.
       annotation.highlightUrl = highlight.uri
+      annotation.commentsUrl = highlight.comments
       @client.request(url: highlight.comments).done (comments) ->
         annotation.commentUrl = comments[0].uri if comments.length
 

      @connect() unless @client.isAuthorized()

  _onAnnotationUpdated: (annotation) =>
    if annotation.commentUrl
      data = @_commentFromAnnotation annotation
      request = @client.updateComment annotation.commentUrl, data
      request.error (xhr) => @error "Unable to update annotation in Readmill"

  _onAnnotationDeleted: (annotation) =>
    if annotation.highlightUrl

  deleteHighlight: (url) ->
    @request type: "DELETE", url: url

  createComment: (url, comment) -> 
    @request type: "POST", url: url, data: {comment}

  updateComment: (url, comment) -> 
    @request type: "PUT", url: url, data: {comment}

  request: (options={}) ->
