some minor cleanup, plus wrapped try blocks around import of PAMlib and PUBSlib to prevent autodoc from dying when PAMlib and PUBSlib don't exist yet