Slugify element ids on /stats. Closes #69 in spirit.

I say 'in spirit' because /stats still doesn't validate, just not for
the reason brought up at the time.