clean up and fixes PAP generator
* clean up
* modal panel "please wait.."  on save/discard/proceed to prevent concurrent calls