9-7 & 9-8 stats middleware example.

Applied to latest widgets example.