 #
 add = (args) ->
   id = args[3]
-   
+
   # Check resolution.
   res = args[4]
   if !isValidResolution res
     log.error "That resolution '#{res}' isn't valid."
     return false
-  
+
   # Add new image to configuration file.
   image =
     id: id
     resolution: getResolutionCode res
     destination: args[5]
   config.images.push image
-  
-  persistConfig() # Update configuration file.
-  
+
+  persistProject() # Update configuration file.
+
   log.info "Added image with ID '#{image.id}' as asset."
-  
+
   install() # Freshly install all images.
-     
-     
+
+
 # Removes an image from installed assets.
 #
 # @param [Object] args the arguments to the program

    else
      # Download failed.
      log.error "Couldn't get information about image with ID '#{id}'"
        
      
# Installs a single image.
#
# @param [Object] image the image to grab

  && body.hits \
  && body.hits instanceof Array \
  && body.hits.length > 0


# Downloads an image.
#
# @param [String] id the Pixabay image ID
