Add a directive for the stats and reuse that html.

Slight change to detail code.