Better fetcher, better global finder,  and adding eval approach if we need it
diff --git a/bundles/org.eclipse.e4.languages.javascript.framework/scripts/Bundle.js b/bundles/org.eclipse.e4.languages.javascript.framework/scripts/Bundle.js
index 022bfb4..ee35784 100644
--- a/bundles/org.eclipse.e4.languages.javascript.framework/scripts/Bundle.js
+++ b/bundles/org.eclipse.e4.languages.javascript.framework/scripts/Bundle.js
@@ -270,9 +270,6 @@
 		
 		var parameterStatement = parameterNames.join(",");
 		var returnStatement = "\n\nreturn {" + exportNames.join(",") + "};";
-
-		var finalScript = this._script + returnStatement;
-		var load = new Function(parameterStatement, finalScript);
 		
 		var that = this;
 		var _ResourceWrapper = function() {
@@ -281,7 +278,11 @@
 			};
 		};
 		_ResourceWrapper.prototype = orion.global;
-		var context = new _ResourceWrapper();
+		var context = new _ResourceWrapper();		
+		var finalScript = this._script + returnStatement;
+		var load = new Function(parameterStatement, finalScript);
+		// or alternately
+		// var load = eval("(function("+parameterStatement+") {\n" + finalScript + "\n})");
 		this._scope = load.apply(context, parameterValues);
 	},
 	_unresolve : function() {
diff --git a/bundles/org.eclipse.e4.languages.javascript.framework/scripts/Framework.js b/bundles/org.eclipse.e4.languages.javascript.framework/scripts/Framework.js
index 71d8964..5b86a9f 100644
--- a/bundles/org.eclipse.e4.languages.javascript.framework/scripts/Framework.js
+++ b/bundles/org.eclipse.e4.languages.javascript.framework/scripts/Framework.js
@@ -287,16 +287,21 @@
 		return request.responseText;
 	}
 	
-	var url = new java.net.URL(location);
-	var buffer = new java.io.BufferedReader(new java.io.InputStreamReader(url.openStream()));
-	var line, responseText = "";
-	try {
-		while ((line = buffer.readLine()) != null)
-			responseText += line;
+	var url = new java.net.URL(location);	
+    var reader = new java.io.InputStreamReader(url.openStream());
+    var stringWriter = new java.io.StringWriter();
+    var buffer = java.lang.reflect.Array.newInstance(java.lang.Character.TYPE, 1024);    
+    var charsRead;
+	
+	try { 
+	    while ((charsRead = reader.read(buffer, 0, 1024)) != -1) {
+	    	stringWriter.write(buffer, 0, charsRead);
+	    }
 	} finally {
-		buffer.close();
+		reader.close;
+		stringWriter.close();
 	}
-	return responseText;		
+	return stringWriter.toString();		
 };
 
 
diff --git a/bundles/org.eclipse.e4.languages.javascript.framework/scripts/__global.js b/bundles/org.eclipse.e4.languages.javascript.framework/scripts/__global.js
index 486b9df..e25a6d2 100644
--- a/bundles/org.eclipse.e4.languages.javascript.framework/scripts/__global.js
+++ b/bundles/org.eclipse.e4.languages.javascript.framework/scripts/__global.js
@@ -1,2 +1,3 @@
 var orion = orion || {};
-orion.global = this;
+(function() {orion.global = this;})();
+