 rerunUpdateTaskObject = (taskID, transactionID, response, callback) ->
 
   # decrement the remainingTransactions property
-  TasksModel.update 
+  TaskModel.update 
     _id: taskID
   , $inc:
     remainingTransactions: -1

        if task.remainingTransactions == 0
          logger.info('Rerun Task #' + taskID + ' - Completed successfully')

      callback(task)

###############################################################
# Function for updating the task object with response details #

#####################################

rerunSetHTTPRequestOptions = (transaction, callback) ->

  if transaction == null
    err = "An empty Transaction object was supplied. Aborting HTTP options configuration"
    return callback err, null

  logger.info('Rerun Transaction #' + transaction._id + ' - HTTP Request options being configured')
  options =
