Added polling of battery charging.