No advice on the shutdown problems. I will say one of the best things I have bought for my Classic was the Hella E-Code replacement headlights from Susquehanna Motorsports.
Often the cause of many odd problems. Glad you got it sorted.Appears the bad battery was the issue.