Moved many functions to mw.Library