Refactor the pzhadaptor code

The PZH WI adaptor code was horribly messy.  This makes it
slightly more readable.

Jira issue: WP-955