It is your IMRC control box. It actuates the secondary linkage on your car based on throttle position. BTW, you should always unhook the positive lead on your car to insure it really has no ground. The car can easily find another ground even when the cable is unhooked from the battery. Since you've driven the car and everything seems to be in working order you should be ok in regards to seeing sparks, but don't tempt fate again.
Rick