Cleaned up for Mediawiki 1.23.1 and current dependencies. A little bit of cargo culting. Still lots of dragons.