Some bug fixes.

Big fixes related to bomb detection and battery states.
Not all bigs are fixed but we are out of time.