Added functions for matching and subsitutions of atomic types