Overworked segmentAnalyzer, issues 2,3,5,6 mostly solved