Move out classes dependent on MediaWiki

Change-Id: I5f2f4a5f0ecbe1a732fa99050df4b73fcd63edd3
Merge "Move out classes dependent on MediaWiki"