Update to release version of javapst, refactore trend analytics.