pgconfig.sh bug fixes

- Major bugs in pgconfig.sh fixed
- deprecated setup.sh removed
- updated documentation