Updated from latest NewPG project