Factored createSectionTitle function.