Integrated Strategy for Optimized Charging and Balancing of Lithium-ion Battery Packs