Converted mcommon to a compilable lib