Updared batstate to work with newer Ubunuts
Couple of misc changes