The last one looks like a harness I found when jumping my car one day (long story) and it attached to the positive battery cable. I hooked it back up thinking it was supposed to be hooked up. Didn't seem to affect anything.
#2 looks like it might be for the locking gas cap?