Added pgconfig first draft (turned off) and fixed unnecessary recreation of protocol and function
Updated common