refactor content metadata construction