Add a method "getMainFunction()" that efficiently locates 'main' in a module