diff --git a/bundles/org.eclipse.wst.jsdt.web.ui/plugin.xml b/bundles/org.eclipse.wst.jsdt.web.ui/plugin.xml
index e0665b5..d44e576 100644
--- a/bundles/org.eclipse.wst.jsdt.web.ui/plugin.xml
+++ b/bundles/org.eclipse.wst.jsdt.web.ui/plugin.xml
@@ -688,14 +688,15 @@
 			</enablement>
 		</renameParticipant>
 
-	   
-	</extension>
-			  <extension  point="org.eclipse.wst.jsdt.core.JsGlobalScopeContainerInitializer">
-	      <JsGlobalScopeContainerInitializer
-	            class="org.eclipse.wst.jsdt.web.ui.WebProjectJsGlobalScopeContainerInitializer"
-	            id="org.eclipse.wst.jsdt.launching.WebProject">
-	      </JsGlobalScopeContainerInitializer>
-  	 </extension>
+	  </extension>
+  <extension point="org.eclipse.wst.jsdt.ui.JsGlobalScopeUIInitializer">
+     <JsGlobalScopeUIInitializer
+     	id="org.eclipse.wst.jsdt.launching.WebProject"
+     	class="org.eclipse.wst.jsdt.web.ui.WebProjectJsGlobalScopeUIInitializer">
+     </JsGlobalScopeUIInitializer>
+   </extension>
+
+
   	 <extension
          point="org.eclipse.ui.popupMenus">
   		<objectContribution
diff --git a/bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/WebProjectJsGlobalScopeContainerInitializer.java b/bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/WebProjectJsGlobalScopeContainerInitializer.java
deleted file mode 100644
index 025a8bb..0000000
--- a/bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/WebProjectJsGlobalScopeContainerInitializer.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/**
- * 
- */
-package org.eclipse.wst.jsdt.web.ui;
-
-import java.net.URI;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.wst.jsdt.core.JsGlobalScopeContainerInitializer;
-import org.eclipse.wst.jsdt.core.IJsGlobalScopeContainer;
-import org.eclipse.wst.jsdt.core.IClasspathEntry;
-import org.eclipse.wst.jsdt.core.IJavaProject;
-import org.eclipse.wst.jsdt.core.compiler.libraries.LibraryLocation;
-import org.eclipse.wst.jsdt.internal.ui.IJsGlobalScopeContainerInitializerExtension;
-import org.eclipse.wst.jsdt.web.core.internal.project.JsWebNature;
-import org.eclipse.wst.jsdt.web.core.javascript.JsNameManglerUtil;
-import org.eclipse.wst.jsdt.web.core.javascript.WebRootFinder;
-
-/**
- * @author childsb
- * 
- */
-public class WebProjectJsGlobalScopeContainerInitializer extends JsGlobalScopeContainerInitializer implements IJsGlobalScopeContainerInitializerExtension {
-	private static final String CONTAINER_DESCRIPTION = Messages.getString("WebProjectJsGlobalScopeContainerInitializer.0"); //$NON-NLS-1$
-	
-	public static final char[] LIB_NAME = {'b','r','o','w','s','e','r','W','i','n','d','o','w','.','j','s'};
-	/* Some tokens for us to identify mangled paths */
-	private static final String MANGLED_BUTT1 = "htm"; //$NON-NLS-1$
-	private static final String MANGLED_BUTT2 = ".js"; //$NON-NLS-1$
-	
-	//private IJavaProject javaProject;
-	
-	
-	private static String getUnmangedHtmlPath(String containerPathString) {
-		if (containerPathString == null) {
-			return null;
-		}
-		if (containerPathString.toLowerCase().indexOf(WebProjectJsGlobalScopeContainerInitializer.MANGLED_BUTT1) != -1 && containerPathString.toLowerCase().indexOf(WebProjectJsGlobalScopeContainerInitializer.MANGLED_BUTT2) != -1) {
-			return JsNameManglerUtil.unmangle(containerPathString);
-		}
-		return null;
-	}
-	public LibraryLocation getLibraryLocation() {
-		return null;
-	}
-	
-	
-	
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.jsdt.core.JsGlobalScopeContainerInitializer#canUpdateJsGlobalScopeContainer(org.eclipse.core.runtime.IPath,
-	 *      org.eclipse.wst.jsdt.core.IJavaProject)
-	 */
-	
-	public boolean canUpdateJsGlobalScopeContainer(IPath containerPath, IJavaProject project) {
-		/* dont remove from this project */
-		return false;
-	}
-	
-	
-	protected IJsGlobalScopeContainer getContainer(IPath containerPath, IJavaProject project) {
-		return this;
-	}
-	
-	
-	public String getDescription() {
-		return WebProjectJsGlobalScopeContainerInitializer.CONTAINER_DESCRIPTION;
-	}
-	
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.jsdt.core.JsGlobalScopeContainerInitializer#getDescription(org.eclipse.core.runtime.IPath,
-	 *      org.eclipse.wst.jsdt.core.IJavaProject)
-	 */
-	
-	public String getDescription(IPath containerPath, IJavaProject javaProject) {
-		if (containerPath.equals(new Path(JsWebNature.VIRTUAL_CONTAINER))) {
-			return WebProjectJsGlobalScopeContainerInitializer.CONTAINER_DESCRIPTION;
-		}
-		
-		String containerPathString = containerPath.toString();
-		IPath webContext = getWebContextRoot(javaProject);
-		String fileExtension = containerPath.getFileExtension();
-		if(containerPath.equals(getWebContextRoot(javaProject)) || (fileExtension!=null && fileExtension.equals("js"))) { //$NON-NLS-1$
-			return webContext.toString();
-		}
-		String unmangled = WebProjectJsGlobalScopeContainerInitializer.getUnmangedHtmlPath(containerPathString);
-		if (unmangled != null) {
-			IPath projectPath = javaProject.getPath();
-			/* Replace the project path with the project name */
-			if (unmangled.indexOf(projectPath.toString()) >= 0) {
-				unmangled = javaProject.getDisplayName() + ":" + unmangled.substring(projectPath.toString().length()); //$NON-NLS-1$
-			}
-			return unmangled;
-		}
-		return containerPathString;
-	}
-	
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.jsdt.core.JsGlobalScopeContainerInitializer#getHostPath(org.eclipse.core.runtime.IPath)
-	 */
-	
-	public URI getHostPath(IPath path, IJavaProject project) {
-		// TODO Auto-generated method stub
-		String htmlPath = WebProjectJsGlobalScopeContainerInitializer.getUnmangedHtmlPath(path.toString());
-		if (htmlPath != null) {
-			URI fileUri =  new Path(htmlPath).toFile().toURI();
-			return fileUri;
-			//			try {
-//				return new URI(htmlPath);
-//			} catch (URISyntaxException ex) {
-//				ex.printStackTrace();
-//			}
-		}
-//		else {
-//			try {
-//				return new URI(path.toString());
-//			} catch (URISyntaxException ex) {
-//				// TODO Auto-generated catch block
-//				ex.printStackTrace();
-//			}
-//		}
-		return null;
-	}
-	
-	
-	public int getKind() {
-		return IJsGlobalScopeContainer.K_SYSTEM;
-	}
-	
-	
-	public IPath getPath() {
-		return new Path(JsWebNature.VIRTUAL_CONTAINER);
-	}
-	/* (non-Javadoc)
-	 * @see org.eclipse.wst.jsdt.internal.ui.IJsGlobalScopeContainerInitialzerExtension#getImage(org.eclipse.core.runtime.IPath, java.lang.String, org.eclipse.wst.jsdt.core.IJavaProject)
-	 */
-	public ImageDescriptor getImage(IPath containerPath, String element, IJavaProject project) {
-		return ImageDescriptor.createFromFile(this.getClass(),"web1.JPG"); //$NON-NLS-1$
-	}
-	public IClasspathEntry[] getClasspathEntries() {
-		
-		//IClasspathEntry entry=null;
-		
-	return new IClasspathEntry[0];
-//		try {
-//		
-//			
-//			
-//			IPath contextPath = getWebContextRoot(javaProject);
-//			//entry =JavaCore.newLibraryEntry(contextPath.makeAbsolute(), null,null, new IAccessRule[0], new IClasspathAttribute[0], true);
-//			//entry =JavaCore.newLibraryEntry(contextPath.makeAbsolute(), null, null, new IAccessRule[0], new IClasspathAttribute[0], true);
-//			//entry =JavaCore.newSourceEntry(contextPath.makeAbsolute());
-//			entry = new ClasspathEntry(
-//					IPackageFragmentRoot.K_SOURCE,
-//					IClasspathEntry.CPE_SOURCE,
-//					contextPath.makeAbsolute(),
-//					ClasspathEntry.INCLUDE_ALL, ClasspathEntry.EXCLUDE_NONE,
-//					null, // source attachment
-//					null, // source attachment root
-//					null, // custom output location
-//					false,
-//					null,
-//					false, // no access rules to combine
-//					new IClasspathAttribute[] {ClasspathEntry.EXCLUDE_VALIDATE}); 
-//			
-//		} catch (RuntimeException ex) {
-//			// TODO Auto-generated catch block
-//			ex.printStackTrace();
-//		}
-//		
-//		if(entry!=null) return new IClasspathEntry[] {entry};
-//		return new IClasspathEntry[0];
-	}
-	public void initialize(IPath containerPath, IJavaProject project) throws CoreException {
-		//this.javaProject = project;
-		super.initialize(containerPath, project);
-		
-	}
-	
-	public static IPath getWebContextRoot(IJavaProject javaProject) {
-		String webRoot = WebRootFinder.getWebContentFolder(javaProject.getProject()).toString();	
-		IPath webRootPath = javaProject.getPath().append(webRoot);
-		return webRootPath;
-	}
-	
-//	public IPath[] getAllHtmlInProject() {
-//		final ArrayList found = new ArrayList();
-//		String webRoot = getWebContextRoot(javaProject).toString();	
-//			IResourceProxyVisitor visitor = new IResourceProxyVisitor()
-//			{
-//				public boolean visit( IResourceProxy proxy ) throws CoreException
-//				{
-//					if ( proxy.getName().endsWith( ".htm" ) )
-//					{
-//						IPath path = proxy.requestResource().getLocation();
-//						found.add(path);
-//						//IClasspathEntry newLibraryEntry = JavaCore.newLibraryEntry( path,null, null, new IAccessRule[ 0 ], new IClasspathAttribute[ 0 ], true );
-//						//entries.add( newLibraryEntry );
-//						return false;
-//					}
-//					
-//					return true;
-//				}
-//			};
-//			try
-//			{
-//				javaProject.getProject().findMember( new Path(webRoot) ).accept( visitor, 0 );
-//			}
-//			catch ( CoreException e )
-//			{
-//			}
-//		
-//		
-//		return (IPath[])found.toArray(new IPath[found.size()]);
-//	
-//	}
-	
-}
diff --git a/bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/WebProjectJsGlobalScopeUIInitializer.java b/bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/WebProjectJsGlobalScopeUIInitializer.java
new file mode 100644
index 0000000..f0eb5a5
--- /dev/null
+++ b/bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/WebProjectJsGlobalScopeUIInitializer.java
@@ -0,0 +1,22 @@
+/**
+ * 
+ */
+package org.eclipse.wst.jsdt.web.ui;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.wst.jsdt.core.IJavaProject;
+import org.eclipse.wst.jsdt.internal.ui.IJsGlobalScopeContainerInitializerExtension;
+
+/**
+ * @author childsb
+ *
+ */
+public class WebProjectJsGlobalScopeUIInitializer implements IJsGlobalScopeContainerInitializerExtension{
+	/* (non-Javadoc)
+	 * @see org.eclipse.wst.jsdt.internal.ui.IJsGlobalScopeContainerInitialzerExtension#getImage(org.eclipse.core.runtime.IPath, java.lang.String, org.eclipse.wst.jsdt.core.IJavaProject)
+	 */
+	public ImageDescriptor getImage(IPath containerPath, String element, IJavaProject project) {
+		return ImageDescriptor.createFromFile(this.getClass(),"web1.JPG"); //$NON-NLS-1$
+	}
+}
