pgmpc: Refactor code with routines for init and reset

A variable to push a password is defined as well, still unused though.