Those appear to be the connectors for the fuel injectors. If I'm seeing it correctly, the light green pipe with the blue connector (on the right side of the image) is the fuel rail. If this area is just under the black cover which has "VTEC" on it, then that's what these are.
However, a P2647 code indicates an issue with the VTEC system (proper code name is: Rocker Arm Oil Pressure Switch Circuit High Voltage). That would indicate to me what you've taped up has nothing to do with the code which popped up. More than likely you've probably disturbed the wiring which would be causing the issue, which allowed it to reconnect correctly and the code went away. You'll probably re-experience the same problem down the road in a short amount of time.
I would look around the engine bay for other wiring which may be causing the issue. It was good to have fixed the issues you did, as they were issues whether they were throwing a code or not. Getting the real issue fixed will be the challenge. The wiring for the VTEC system should be located at one or the other end of the head (the head is directly under the valve cover, which is in the top of picture and has the oil fill cap in it). The VTEC system just allows oil pressure to affect the positioning of the rocker arms within the engine. It shouldn't affect drive-ability of the vehicle too much, as VTEC only kicks in around 4200rpm, which is fairly lofty engine speed considering normal driving.