 
   # Set comment from the COMMENT keyword
   setComment: (comment) ->
-    unless @cards.hasOwnProperty("COMMENT")
+    unless @contains("COMMENT")
       @cards["COMMENT"] = []
       @cardIndex += 1
     @cards["COMMENT"].push(comment)
 
   # Set history from the HISTORY keyword
   setHistory: (history) ->
-    unless @cards.hasOwnProperty("HISTORY")
+    unless @contains("HISTORY")
       @cards["HISTORY"] = []
       @cardIndex += 1
     @cards["HISTORY"].push(history)

    
  # Get the index value and comment for a key
  get: (key) ->
    if @cards.hasOwnProperty(key) then return @cards[key] else console.warn("Header does not contain the key #{key}")

  # Get the index for a specified key
  getIndex: (key) ->
    if @cards.hasOwnProperty(key) then return @cards[key][0] else console.warn("Header does not contain the key #{key}")

  # Get the comment for a specified key
  getComment: (key) ->
    if @contains(key)
      if @cards[key][2]?
        return @cards[key][2]
      else
        console.warn("#{key} does not contain a comment")
    else
      console.warn("Header does not contain the key #{key}")

  # Get comments stored with the COMMENT keyword
  getComments: ->
    if @cards.hasOwnProperty(key) then return @cards['COMMENT'] else console.warn("Header does not contain any COMMENT fields")

  # Get history stored with the HISTORY keyword
  getHistory: ->
    if @cards.hasOwnProperty(key) then return @cards['HISTORY'] else console.warn("Header does not contain any HISTORY fields")

  # Set a key with a passed value and optional comment
  set: (key, value, comment) ->

    # Verification
    keyToVerify = key
    [array, index] = [false, undefined]
    match = key.match(Header.arrayPattern)
    if match?
      keyToVerify = match[1]
      [array, index] = [true, match[2]]
