Adapted simplePlugin::mainInc so that it can be used with plugin