software - bring into line with collections pattern, plus some trivial fixes