Replaced p2f with ref
Replaced msg/field instantiators with templates