Remove unused code from fix_expression_types
Refactor PrimPath into PrimCall, PrimIndex, PrimSubstring and PrimSelector