Moving functions to pm-common.pl 2