Refactor list fragment generation