Random stuff from poking at replacing mwlib