misc cleanup from Sonar suggestions