Proper merge of pimp specific functions into pm-common & cleanup.