Rename misnamed local variable.
Respect the _lp_battery API.
Replace "pmset -g batt" parsing.