Start of the stats page
Added some more escaping, and updated some of the formatting.
Merge branch 'master' into stats
Fix for the ellipses.
Moved the stats functions into theme_stuff.php