slight refactoring, added stats refactored into jade template.