Merged Martin's fix. Got commonmod, debugprint and mtargs modules working