Random improvements

Mainly fixing documentation, adhering to MediaWiki code conventions, etc.

Left a few @fixme's where I saw things that didn't look right but wasn't sure on how to fix them.
Yeah, that would fix the problem right now with users getting possibly corrupted data, but the real solution would be to have this work with parser cache. I'm not really sure how to do that.