latest ZH analysis code

Hi @ekfriis,

Here's the latest and greatest version of the ZH analysis code. No major additions really.

Stephane