fixes error in module prototype tree generation, argument pass through and require fn to require modules