Fixes #23 Added Trend Analytics and misc. cleanup.