Reorganized phz and npd to better suit "one module, one task"