Is simpler and avoids exposing profile structs to a degree. (cherry picked from commit 036a49478f)
036a49478f