Tidied up the PAM module.