Update for stats commands.

Adds percentages. Some code cleanup.