Refactored render_collection_items() method