Cleaned up template files. Added stats.