Pwdtoggle function.
Small improvements.