Battery Fixes

Fixed the resanence issue with the battery model and added the frame
work for a thermal model of he battery.