Mayor Update

I made mayor changes to this extension that could be pulled into wikimedia repo