Update to 2.2, fixing various bugs and adding PblAnalytics code.