Depending on the kernel different names are used in
/sys/class/power_supply/BAT0 and as the name of the AC adaptor.
These changes take this situation into consideration.
Removed the *.swp files.