                     Photo.initPhotosFrom(imageMetadata, forPin: pin)
                 }
             }
-*/
+
         }
         
         return pin
     }
     
-    /* Create a new Pin at the specified 2D map coordinate and return it. */
-    func createPinAtCoordinate(#latitude: Double, longitude: Double) -> Pin {
+    /* 
+    @brief Create a new Pin in the specified Core Data context at the specified 2D map coordinate and return it.
+    @param latitude (in) map coordinate
+    @param longitude (in) map coordinate
+    @param context (in) Core Data context to use when instantiating the Pin object.
+    */
+    func createPinAtCoordinate(#latitude: Double, longitude: Double, context: NSManagedObjectContext) -> Pin {
         var dict = [String: AnyObject]()
         dict[Pin.Keys.latitude] = latitude
         dict[Pin.Keys.longitude] = longitude
-        let pin = Pin(dictionary: dict, context: sharedContext)
+        let pin = Pin(dictionary: dict, context: context)
         return pin
     }
     

                // Create a new Pin instance, display on the map, and save to the context.
                self.ephemeralPin = createPinAtPoint(viewPoint, bPersistPin: false)
                // TODO: testing. moved to .Ended
//                if let pin = self.ephemeralPin {
//                    self.ephemeralAnnotations.append(pin.annotation)
//                    println("added ephemeral annotation.")
//                }
                
                println(".Began ephemeral annotation count = \(self.ephemeralAnnotations.count)")
                println(".Began mapView annotation count = \(self.mapView.annotations.count)")

        let mapPoint: CLLocationCoordinate2D = self.mapView.convertPoint(viewPoint, toCoordinateFromView: self.mapView)
        println("CreatePinAtCoordinate mapPoint = \(mapPoint.latitude), \(mapPoint.longitude)") // TODO: remove
        
        var context: NSManagedObjectContext
        if bPersistPin {
            context = sharedContext
        } else {
            context = scratchContext
        }
        
        // Create a pin (annotation) based on the calculated gps coordinates.
        let pin: Pin = createPinAtCoordinate(latitude: mapPoint.latitude, longitude: mapPoint.longitude, context: context)
        
        if bPersistPin {
            
            // Display the pin on the map.
            showPinOnMap(pin)

            // TODO: persist the pin
//TODO - debug             savePin()

            // TODO: Udacious - As soon as a pin is dropped on the map, the photos for that location are pre-fetched from Flickr
            self.flickr.searchPhotosBy2DCoordinates(pin) {
                success, error, imageMetadata in
