Final commit. In all likelihood this will be replaced by the version in hgc-tools