Added possibility to handle a battery other than BAT0
Added some comments and changed code indent