Electronic – lithium polymer battery connections

lithium

I'm trying to replace my tablet li po batteries and am trying to understand the connections.
The following figure shows the 2 3.7v batteries connected in series. Most replacement batteries I've seen have just 2 wires coming out of them. I understand I connect them to the +ve and -ve contacts on the PCB. However, I'm wondering where do the black wires coming from the PCB connect on the battery and what is their purpose.

Also what is the whitish gluish like substance that covers the black wire connections on the PCB

The tablet is Fujitsu Stylistic M532 and the battery part number is FPCBP388

batteries with pcb

Below is the back side where the battery tabs connect to the PCB

backside

Closeup of where the black wires go into the battery.
closeup

Best Answer

The black wires are connected to a thermistor on the end of each. The white goop is heatsink compound. They are used to monitor the temperature of the cells in order to provide a thermal mechanism for detecting full charge as well as part of a safety mechanism to prevent the cells from igniting.