Rewrote for the Pywikipedia rewrite branch