Charger detection improvements

Just a proposal... works for me :)