Refactor caption into separate helper.