Added a stat formatter class; added avg command.