[MGPG-3, MGPG-6, MGPG-7, MGPG-5] Bunch of fixes for GPG that have been sitting on my hard drive. (Patch from Christian Schulte of MGPG-3 is in there)