Refactor some val handling to simplify possible ambiguities in call graph.