Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/GS3MapLibrary.gwt.xml
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/GS3MapLibrary.gwt.xml	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/GS3MapLibrary.gwt.xml	(revision 23934)
@@ -10,4 +10,4 @@
   	<!--<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=ABQIAAAAtgBCR-EMOIox9GYORrWZ4xT2yXp_ZAY8_ufC3CFXhHIE1NvwkxTdn97J3Y4bgIWO98Jw2xGa7SsjVQ"/>-->
   	<!--<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=ABQIAAAAtgBCR-EMOIox9GYORrWZ4xRDDXBaPmHH9_0fCH2SRcUU9bjcjhT3cD_2Hv84s1XjkWPxzMb0RT2hQQ"/>-->
-  	<entry-point class='org.greenstone.client.GS3MapLibrary'/>
+  	<entry-point class='org.greenstone.atlas.client.GS3MapLibrary'/>
 </module>
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/FindPlaceService.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/FindPlaceService.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/FindPlaceService.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.client;
+package org.greenstone.atlas.client;
 
 import java.util.ArrayList;
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/FindPlaceServiceAsync.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/FindPlaceServiceAsync.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/FindPlaceServiceAsync.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.client;
+package org.greenstone.atlas.client;
 
 import java.util.ArrayList;
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/GS3MapLibrary.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/GS3MapLibrary.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/GS3MapLibrary.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.client;
+package org.greenstone.atlas.client;
 
 import com.google.gwt.core.client.EntryPoint;
@@ -158,5 +158,5 @@
 	protected String _currentCollection = "";
 	protected String _currentURL = "";
-	protected final String _GREENSTONEURL = "http://taniwha.resnet.scms.waikato.ac.nz:8080/greenstone3";
+	protected final String _GREENSTONEURL = "http://localhost:8486/greenstone3";
 	//protected final String _GREENSTONEURL = "http://www.nzdl.org/atlasgreenstone3";
 	protected final String _GREENSTONEDEVURL = _GREENSTONEURL + "/dev";
@@ -176,5 +176,5 @@
 		_geocoder = new Geocoder();
 
-		((ServiceDefTarget) _findPlaceService).setServiceEntryPoint("http://taniwha.resnet.scms.waikato.ac.nz:8080/ATLAS/findPlace");
+		((ServiceDefTarget) _findPlaceService).setServiceEntryPoint("http://localhost:8486/ATLAS/findPlace");
 		//((ServiceDefTarget) _findPlaceService).setServiceEntryPoint("http://www.nzdl.org/ATLAS/findPlace");
 		
@@ -191,5 +191,5 @@
 
 		//Load the Greenstone home page
-		loadPageFromUrl("http://taniwha.resnet.scms.waikato.ac.nz:8080/greenstone3/dev?a=p&sa=home");
+		loadPageFromUrl(_GREENSTONEDEVURL + "?a=p&sa=home");
 	}
 
@@ -250,5 +250,21 @@
 		_statusBar.addUpdate("Loading new page", "LoadPage");
 		
-		getNewPage(url);
+		getNewPage(url.contains("?") ? (url + "&excerpttag=body") : (url + "?excerpttag=body"), 
+			new ResponseFunction(){
+				public void function(String response){
+					HTML newPage = new HTML(response);
+					newPage.getElement().setId("newpage");
+					Element oldNewPage = (Element) Document.get().getElementById("newpage");
+					if(oldNewPage != null)
+					{
+						oldNewPage.removeFromParent();
+					}
+					getElementsByTagName("body").get(0).appendChild(newPage.getElement());
+					newPage.setVisible(false);
+
+					showLoadedPage();
+				}
+			}
+		);
 	}
 	
@@ -271,7 +287,7 @@
 	}
 	
-	public void getNewPage(String url)
-	{
-		RequestBuilder newPageRequest = new RequestBuilder(RequestBuilder.GET, url.contains("?") ? (url + "&excerpttag=body") : (url + "?excerpttag=body"));
+	public void getNewPage(String url, final ResponseFunction responseFunc)
+	{
+		RequestBuilder newPageRequest = new RequestBuilder(RequestBuilder.GET, url);
 		try{
 			newPageRequest.sendRequest(null, new RequestCallback()
@@ -281,15 +297,5 @@
 					if(response.getStatusCode() == Response.SC_OK)
 					{
-						HTML newPage = new HTML(response.getText());
-						newPage.getElement().setId("newpage");
-						Element oldNewPage = (Element) Document.get().getElementById("newpage");
-						if(oldNewPage != null)
-						{
-							oldNewPage.removeFromParent();
-						}
-						getElementsByTagName("body").get(0).appendChild(newPage.getElement());
-						newPage.setVisible(false);
-
-						showLoadedPage();
+						responseFunc.function(response.getText());
 					}
 				}
@@ -383,10 +389,24 @@
 			
 			//Add <link> and <script> elements to <head>
-			//changeCSSLinksAndScripts();
+			getNewPage(_currentURL.contains("?") ? (_currentURL + "&excerpttag=head") : (_currentURL + "?excerpttag=head"), 
+				new ResponseFunction(){
+					public void function(String response){
+						HTML newPage = new HTML(response);
+						changeCSSLinksAndScripts(newPage.getElement());
+					}
+				}
+			);
 		}
 		else
 		{
 			//Add <link> and <script> elements to <head>
-			//changeCSSLinksAndScripts();
+			getNewPage(_currentURL.contains("?") ? (_currentURL + "&excerpttag=head") : (_currentURL + "?excerpttag=head"), 
+				new ResponseFunction(){
+					public void function(String response){
+						HTML newPage = new HTML(response);
+						changeCSSLinksAndScripts(newPage.getElement());
+					}
+				}
+			);
 
 			//Fix webpage elements so that they point to the correct address
@@ -529,16 +549,7 @@
 		}
 		
-		if(headerElem == null)
-		{
-			alert("header is null");
-		}
-		if(bodyElem == null)
-		{
-			alert("body is null");
-		}	
-		if(footerElem == null)
-		{
-			alert("footer is null");
-		}
+		if(headerElem == null){alert("header is null");}
+		if(bodyElem == null){alert("body is null");}	
+		if(footerElem == null){alert("footer is null");}
 
 		// Add header
@@ -875,9 +886,8 @@
 	 * Remove old CSS links from the page and add new ones, the href attributes are also corrected
 	 */
-	public void changeCSSLinksAndScripts()
+	public void changeCSSLinksAndScripts(Element newHead)
 	{		
-		//Get the head section of the HTML page
 		Element head = getDocumentHead();
-
+		
 		//Get all of the <link> elements from the HTML header 
 		NodeList<com.google.gwt.dom.client.Element> currentLinks = head.getElementsByTagName("link");
@@ -885,11 +895,12 @@
 		//Get all of the <script> elements from the HTML header 
 		NodeList<com.google.gwt.dom.client.Element> currentScripts = head.getElementsByTagName("script");
-
+		
 		//Add the new links
-		com.google.gwt.xml.client.NodeList newLinks = _currentNewPageDoc.getElementsByTagName("link");	
+		NodeList<com.google.gwt.dom.client.Element> newLinks = newHead.getElementsByTagName("link");	
 		for (int i = 0; i < newLinks.getLength(); i++)
 		{
-			com.google.gwt.xml.client.Element e = (com.google.gwt.xml.client.Element) newLinks.item(i);
+			com.google.gwt.dom.client.Element e = newLinks.getItem(i);
 			boolean found = false;
+
 			for(int j = 0; j < currentLinks.getLength(); j++)
 			{
@@ -902,51 +913,42 @@
 				}
 			}
+
+			if(!found)
+			{
+				Element newElem = DOM.createElement("link");
+				newElem.setAttribute("href", e.getAttribute("href"));
+				newElem.setAttribute("type", e.getAttribute("type"));
+				newElem.setAttribute("rel", e.getAttribute("rel"));
+				
+				if(!newElem.getAttribute("href").startsWith("http://"))
+				{
+					newElem.setAttribute("href", _GREENSTONEURL + "/" + newElem.getAttribute("href"));	
+				}
+				head.appendChild(newElem);
+			}
+		}
+		
+		//Add the new scripts on the page
+		NodeList<com.google.gwt.dom.client.Element> newScripts = newHead.getElementsByTagName("script");	
+		for (int i = 0; i < newScripts.getLength(); i++)
+		{
+			com.google.gwt.dom.client.Element e = newScripts.getItem(i);
+			boolean found = false;
+			for(int j = 0; j < currentScripts.getLength(); j++)
+			{
+				Element elem = (Element) currentLinks.getItem(j);
+				if(e.getAttribute("src").equals(elem.getAttribute("src")) 
+				&& e.getAttribute("type").equals(elem.getAttribute("type")))
+				{
+					found = true;
+				}
+			}
 			
 			if(!found)
 			{
-				Element newElem = DOM.createElement("link");
-				
-				NamedNodeMap map = e.getAttributes();
-				for(int k = 0; k < e.getAttributes().getLength(); k++)
-				{
-					newElem.setAttribute(map.item(k).getNodeName(), map.item(k).getNodeValue());
-				}
-				
-				if(!newElem.getAttribute("href").startsWith("http://"))
-				{
-					newElem.setAttribute("href", _GREENSTONEURL + "/" + newElem.getAttribute("href"));	
-				}
-				head.appendChild(newElem);
-			}
-		}
-		
-		//Add the new scripts on the page
-		com.google.gwt.xml.client.NodeList newScripts = _currentNewPageDoc.getElementsByTagName("script");	
-		for (int i = 0; i < newScripts.getLength(); i++)
-		{
-			com.google.gwt.xml.client.Element e = (com.google.gwt.xml.client.Element) newScripts.item(i);
-			boolean found = false;
-			for(int j = 0; j < currentScripts.getLength(); j++)
-			{
-				Element elem = (Element) currentLinks.getItem(j);
-				if(e.getAttribute("src").equals(elem.getAttribute("src")) 
-				&& e.getAttribute("type").equals(elem.getAttribute("type"))
-				&& e.getAttribute("charset").equals(elem.getAttribute("charset")))
-				{
-					found = true;
-				}
-			}
-			
-			if(!found)
-			{
-				Element newElem = DOM.createElement("link");
-				
-				NamedNodeMap map = e.getAttributes();
-				for(int k = 0; k < e.getAttributes().getLength(); k++)
-				{
-					newElem.setAttribute(map.item(k).getNodeName(), map.item(k).getNodeValue());
-				}
-				
-				
+				Element newElem = DOM.createElement("script");
+				newElem.setAttribute("src", e.getAttribute("src"));
+				newElem.setAttribute("type", e.getAttribute("type"));
+						
 				if(!e.getAttribute("src").startsWith("http://"))
 				{
@@ -993,4 +995,10 @@
 				continue;
 			}
+			
+			if(e.getAttribute("href").startsWith("javascript:"))
+			{
+				continue;
+			}
+			
 			if (!e.getAttribute("href").startsWith("http://") && !e.getAttribute("href").startsWith("/"))
 			{
@@ -1045,5 +1053,5 @@
 		$wnd.loadPageFromFormJS = function(form)
 		{
-			ml.@org.greenstone.client.GS3MapLibrary::loadPageFromForm(Lcom/google/gwt/user/client/Element;) (form);
+			ml.@org.greenstone.atlas.client.GS3MapLibrary::loadPageFromForm(Lcom/google/gwt/user/client/Element;) (form);
 		};
 	}-*/;
@@ -1057,5 +1065,5 @@
 		$wnd.loadPageFromUrlJS = function(url)
 		{
-			ml.@org.greenstone.client.GS3MapLibrary::loadPageFromUrl(Ljava/lang/String;) (url);
+			ml.@org.greenstone.atlas.client.GS3MapLibrary::loadPageFromUrl(Ljava/lang/String;) (url);
 		};
 	}-*/;
@@ -1069,5 +1077,5 @@
 		$wnd.loadSpatialSearchPageJS = function()
 		{
-			ml.@org.greenstone.client.GS3MapLibrary::loadSpatialSearchPage() ();
+			ml.@org.greenstone.atlas.client.GS3MapLibrary::loadSpatialSearchPage() ();
 		};
 	}-*/;
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/Menu.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/Menu.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/Menu.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.client;
+package org.greenstone.atlas.client;
 
 import java.util.ArrayList;
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/MenuItem.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/MenuItem.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/MenuItem.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.client;
+package org.greenstone.atlas.client;
 
 import com.google.gwt.event.dom.client.ClickHandler;
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/Place.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/Place.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/Place.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.client;
+package org.greenstone.atlas.client;
 
 import java.io.Serializable;
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/ResponseFunction.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/ResponseFunction.java	(revision 23934)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/ResponseFunction.java	(revision 23934)
@@ -0,0 +1,6 @@
+package org.greenstone.atlas.client;
+
+public interface ResponseFunction
+{
+	public void function(String response);
+}
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/StatusBar.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/StatusBar.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/StatusBar.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.client;
+package org.greenstone.atlas.client;
 
 import java.util.ArrayList;
@@ -87,5 +87,5 @@
 		{
 			GS3MapLibrary.logToConsole("Adding progress image");
-			status += "<br/><img src=\"http://localhost:8080/ATLAS/images/progress.gif\"></img>"; 
+			status += "<br/><img src=\"http://localhost:8486/ATLAS/images/progress.gif\"></img>"; 
 		}
 		_statusBarDiv.setHTML(status);
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/TemporaryFrame.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/TemporaryFrame.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/client/TemporaryFrame.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.client;
+package org.greenstone.atlas.client;
 
 import com.google.gwt.core.client.JsArray;
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/FindPlaceServiceImpl.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/FindPlaceServiceImpl.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/FindPlaceServiceImpl.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.server;
+package org.greenstone.atlas.server;
 
 import java.net.URLConnection;
@@ -8,6 +8,6 @@
 import java.util.ArrayList;
 
-import org.greenstone.client.FindPlaceService;
-import org.greenstone.client.Place;
+import org.greenstone.atlas.client.FindPlaceService;
+import org.greenstone.atlas.client.Place;
 
 import com.google.gwt.user.server.rpc.RemoteServiceServlet;
@@ -25,7 +25,7 @@
 	public Boolean loadGazetteer()
 	{
-		System.out.print("Loading Gazetteer... ");
+		System.err.println("Loading Gazetteer... ");
 		_pageScanner = new PageScanner(this.getServletContext().getRealPath(""));
-		System.out.println("Done!");
+		System.err.println("... Done!");
 		return true;
 	}
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GateScanner.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GateScanner.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GateScanner.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.server;
+package org.greenstone.atlas.server;
 
 import gate.Annotation;
@@ -31,9 +31,9 @@
 		{
 			BasicConfigurator.configure();
-			Gate.setGateHome(new File("C:\\Users\\sjm84\\Desktop\\stuff\\Gate5.2"));
-			Gate.setPluginsHome(new File("C:\\Users\\sjm84\\Desktop\\stuff\\Gate5.2\\plugins"));
-			Gate.setUserConfigFile(new File("C:\\Users\\sjm84\\Desktop\\stuff\\Gate5.2\\gate.xml"));
+			Gate.setGateHome(new File("C:\\Users\\sjm84\\Desktop\\Gate"));
+			Gate.setPluginsHome(new File("C:\\Users\\sjm84\\Desktop\\Gate\\plugins"));
+			Gate.setUserConfigFile(new File("C:\\Users\\sjm84\\Desktop\\Gate\\gate.xml"));
 			Gate.init();
-			Gate.getCreoleRegister().registerDirectories(new File("C:\\Users\\sjm84\\Desktop\\stuff\\Gate5.2\\plugins\\ANNIE").toURI().toURL()); 
+			Gate.getCreoleRegister().registerDirectories(new File("C:\\Users\\sjm84\\Desktop\\Gate\\plugins\\ANNIE").toURI().toURL()); 
 			Gate.getUserConfig().put(GateConstants.DOCUMENT_ADD_SPACE_ON_UNPACK_FEATURE_NAME, new Boolean(false));
 			
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerHelper.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerHelper.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerHelper.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.server;
+package org.greenstone.atlas.server;
 
 import java.util.ArrayList;
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieFullNode.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieFullNode.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieFullNode.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.server;
+package org.greenstone.atlas.server;
 
 import java.io.Serializable;
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieNode.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieNode.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieNode.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.server;
+package org.greenstone.atlas.server;
 
 
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieSmallNode.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieSmallNode.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieSmallNode.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.server;
+package org.greenstone.atlas.server;
 
 import java.io.Serializable;
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieTopLevelNode.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieTopLevelNode.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieTopLevelNode.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.server;
+package org.greenstone.atlas.server;
 
 import java.io.Serializable;
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieType1.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieType1.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieType1.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.server;
+package org.greenstone.atlas.server;
 
 import java.io.BufferedReader;
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieType2.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieType2.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieType2.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.server;
+package org.greenstone.atlas.server;
 
 import java.io.BufferedReader;
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieType3.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieType3.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieType3.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.server;
+package org.greenstone.atlas.server;
 
 import java.io.BufferedReader;
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieType4.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieType4.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieType4.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.server;
+package org.greenstone.atlas.server;
 
 import java.io.BufferedReader;
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieType5.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieType5.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/GazetteerTrieType5.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.server;
+package org.greenstone.atlas.server;
 
 import java.io.BufferedReader;
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/HTMLParser.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/HTMLParser.java	(revision 23934)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/HTMLParser.java	(revision 23934)
@@ -0,0 +1,148 @@
+package org.greenstone.atlas.server;
+
+import java.io.BufferedWriter;
+import java.io.FileWriter;
+import java.util.ArrayList;
+
+public class HTMLParser
+{
+	protected char[] _html = null;
+	protected int _index = 0;
+	
+	ArrayList<String> _fullWordList = new ArrayList<String>();
+	ArrayList<String> _fullBetweenList = new ArrayList<String>();
+	
+	public HTMLParser(String html)
+	{		
+		_html = html.toCharArray();
+		
+		String other = getNextCharactersBetweenWords();
+		String word = getNextWord();
+		while(word != null || other != null)
+		{
+			if(word != null)
+			{
+				_fullWordList.add(word);
+			}
+			
+			if(other != null)
+			{
+				_fullBetweenList.add(other);
+			}
+			
+			other = getNextCharactersBetweenWords();
+			word = getNextWord();
+		}
+	}
+	
+	public String getNextCharactersBetweenWords()
+	{
+		if(_index >= _html.length)
+		{
+			return null;
+		}
+		
+		StringBuilder chars = new StringBuilder();
+		
+		while(true)
+		{
+			if(_index >= _html.length)
+			{
+				break;
+			}
+			
+			if(_html[_index] == '<')
+			{
+				chars.append(_html[_index]);
+				int bracketCount = 1;
+				while(_index < _html.length && bracketCount > 0)
+				{
+					_index++;
+					if(_html[_index] == '>')
+					{
+						bracketCount--;
+					}
+					else if(_html[_index] == '<')
+					{
+						bracketCount++;
+					}
+					chars.append(_html[_index]);	
+				}
+			}
+			else if(!Character.isLetter(_html[_index]))
+			{
+				chars.append(_html[_index]);
+			}
+			else
+			{
+				break;
+			}
+			_index++;
+		}
+		
+		if(chars.length() == 0)
+		{
+			return null;
+		}
+		return chars.toString();
+	}
+	
+	public String getNextWord()
+	{
+		if(_index >= _html.length)
+		{
+			return null;
+		}
+		
+		StringBuilder newWord = new StringBuilder();
+		
+		while(true)
+		{
+			char currentCharacter = _html[_index];
+			if(!Character.isLetter(currentCharacter))
+			{
+				break;
+			}
+			else
+			{
+				newWord.append(currentCharacter);
+			}
+			_index++;
+		}
+		return newWord.toString();
+	}
+	
+	public ArrayList<String> getFullHTMLWordList()
+	{
+		return _fullWordList;
+	}
+	
+	public ArrayList<String> getFullBetweenWordList()
+	{
+		return _fullBetweenList;
+	}
+	
+	public static String removeTags(String htmlString)
+	{
+		StringBuilder cleanText = new StringBuilder();
+		
+		int inTag = 0;
+		for(char c : htmlString.toCharArray())
+		{
+			if(c == '<')
+			{
+				inTag++;
+			}
+			else if(c == '>' && inTag > 0)
+			{
+				inTag--;
+			}
+			else if(inTag == 0)
+			{
+				cleanText.append(c);
+			}
+		}
+		
+		return cleanText.toString();
+	}
+}
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/MarkupService.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/MarkupService.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/MarkupService.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.server;
+package org.greenstone.atlas.server;
 
 
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/PageScanner.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/PageScanner.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/PageScanner.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.server;
+package org.greenstone.atlas.server;
 
 import gate.util.Out;
@@ -10,5 +10,5 @@
 import java.util.HashMap;
 
-import org.greenstone.client.Place;
+import org.greenstone.atlas.client.Place;
 
 public class PageScanner
@@ -42,5 +42,5 @@
 	public PageScanner(String path)
 	{
-		System.out.println("Loading path = " + path);
+		System.err.println("Loading path = " + path);
 		try
 		{
@@ -51,5 +51,5 @@
 			ex.printStackTrace();
 		}
-		System.out.println("Starting loading gazetteer");
+		System.err.println("Starting loading gazetteer");
 		_gazetteer = new GazetteerTrieType2(path + "/dataen.txt");
 	}
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/PlaceInformation.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/PlaceInformation.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/PlaceInformation.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.server;
+package org.greenstone.atlas.server;
 
 import java.sql.Connection;
@@ -6,5 +6,5 @@
 import java.sql.Statement;
 import java.util.ArrayList;
-import org.greenstone.client.Place;
+import org.greenstone.atlas.client.Place;
 import java.util.HashMap;
 
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/ScanConfiguration.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/ScanConfiguration.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/ScanConfiguration.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.server;
+package org.greenstone.atlas.server;
 
 public class ScanConfiguration
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/ScanResultSet.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/ScanResultSet.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/ScanResultSet.java	(revision 23934)
@@ -1,9 +1,9 @@
-package org.greenstone.server;
+package org.greenstone.atlas.server;
 
 import java.util.ArrayList;
 import java.util.HashMap;
 
-import org.greenstone.client.Place;
-import org.greenstone.server.ServerPlace;
+import org.greenstone.atlas.client.Place;
+import org.greenstone.atlas.server.ServerPlace;
 
 public class ScanResultSet
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/ServerPlace.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/ServerPlace.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/ServerPlace.java	(revision 23934)
@@ -1,6 +1,6 @@
-package org.greenstone.server;
+package org.greenstone.atlas.server;
 
 import java.io.Serializable;
-import org.greenstone.client.Place;
+import org.greenstone.atlas.client.Place;
 
 public class ServerPlace implements Serializable
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/ServerSideTests.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/ServerSideTests.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/ServerSideTests.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.server;
+package org.greenstone.atlas.server;
 
 import java.awt.BorderLayout;
@@ -32,5 +32,5 @@
 import javax.swing.event.ListSelectionListener;
 
-import org.greenstone.client.Place;
+import org.greenstone.atlas.client.Place;
 
 public class ServerSideTests
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/StringLengthComparator.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/StringLengthComparator.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/StringLengthComparator.java	(revision 23934)
@@ -1,4 +1,3 @@
-package org.greenstone.server;
-
+package org.greenstone.atlas.server;
 
 import java.util.Comparator;
Index: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/Word.java
===================================================================
--- gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/Word.java	(revision 23906)
+++ gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/Word.java	(revision 23934)
@@ -1,3 +1,3 @@
-package org.greenstone.server;
+package org.greenstone.atlas.server;
 
 import java.util.ArrayList;
