Index: trunk/src/org/expeditee/actions/Debug.java
===================================================================
--- trunk/src/org/expeditee/actions/Debug.java	(revision 1279)
+++ trunk/src/org/expeditee/actions/Debug.java	(revision 1280)
@@ -28,7 +28,10 @@
 import javax.swing.JPanel;
 
+import org.expeditee.core.Colour;
 import org.expeditee.gio.swing.SwingGraphicsManager;
 import org.expeditee.gio.swing.SwingInputManager;
 import org.expeditee.gui.DisplayController;
+import org.expeditee.gui.FrameCreator;
+import org.expeditee.gui.FrameIO;
 import org.expeditee.gui.MessageBay;
 import org.expeditee.items.Constraint;
@@ -126,3 +129,14 @@
 		MessageBay.displayMessage(DisplayController.getCurrentFrame().getItems().stream().filter(t -> t.getMinWidth() != null).collect(Collectors.toList()).size() + "");
 	}
+	
+	public static void FrameCreatorTest() {
+		FrameCreator creator = new FrameCreator("testFrameset", FrameIO.FRAME_PATH, "TestFrameset", FrameCreator.ExistingFramesetOptions.AppendSegregatedFrames, false);
+		creator.addText("Test1", Colour.CYAN, null, null, true);
+		
+		creator = new FrameCreator("testFrameset", FrameIO.FRAME_PATH, "TestFrameset", FrameCreator.ExistingFramesetOptions.AppendSegregatedFrames, false);
+		creator.addText("Test2", Colour.CYAN, null, null, true);
+		
+		creator = new FrameCreator("testFrameset", FrameIO.FRAME_PATH, "TestFrameset", FrameCreator.ExistingFramesetOptions.OverrideExistingFrames, false);
+		creator.addText("Test3", Colour.CYAN, null, null, true);
+	}
 }
Index: trunk/src/org/expeditee/agents/SearchAgent.java
===================================================================
--- trunk/src/org/expeditee/agents/SearchAgent.java	(revision 1279)
+++ trunk/src/org/expeditee/agents/SearchAgent.java	(revision 1280)
@@ -98,5 +98,5 @@
 				+ "]"+getResultsTitleSuffix();
 		_results = new FrameCreator(resultsFrameset, FrameIO.FRAME_PATH, title,
-				FrameCreator.ExistingFramesetOptions.CreateNewFramesOnly, true);
+				FrameCreator.ExistingFramesetOptions.AppendSegregatedFrames, true);
 		// Set the frame to be displayed after running the agent
 		_end = _results.getFirstFrame();
Index: trunk/src/org/expeditee/agents/mail/MailSession.java
===================================================================
--- trunk/src/org/expeditee/agents/mail/MailSession.java	(revision 1279)
+++ trunk/src/org/expeditee/agents/mail/MailSession.java	(revision 1280)
@@ -527,5 +527,5 @@
 					final FrameCreator frames = new FrameCreator(frame
 							.getFramesetName(), frame.getPath(), subject,
-							FrameCreator.ExistingFramesetOptions.CreateNewFramesOnly, false);
+							FrameCreator.ExistingFramesetOptions.AppendSegregatedFrames, false);
 
 					frames.addText("@date: " + message.getSentDate(), null,
Index: trunk/src/org/expeditee/auth/Actions.java
===================================================================
--- trunk/src/org/expeditee/auth/Actions.java	(revision 1279)
+++ trunk/src/org/expeditee/auth/Actions.java	(revision 1280)
@@ -97,5 +97,5 @@
 	 * @throws ParseException 
 	 */
-	public static void MailMode() throws KeyStoreException, FileNotFoundException, NoSuchAlgorithmException, CertificateException, ClassNotFoundException, SQLException, IOException, ParseException {
+	public static void ToggleBay() throws KeyStoreException, FileNotFoundException, NoSuchAlgorithmException, CertificateException, ClassNotFoundException, SQLException, IOException, ParseException {
 		if (!DisplayController.isMailMode()) {
 			Mail.clear();
Index: trunk/src/org/expeditee/auth/gui/MailBay.java
===================================================================
--- trunk/src/org/expeditee/auth/gui/MailBay.java	(revision 1279)
+++ trunk/src/org/expeditee/auth/gui/MailBay.java	(revision 1280)
@@ -93,5 +93,5 @@
 		if (_creator == null || currentUser != UserSettings.UserName.get()) {
 			currentUser = UserSettings.UserName.get();
-			_creator = new FrameCreator(EXPEDITEE_MAIL_FRAMESET_NAME, FrameIO.MAIL_PATH, EXPEDITEE_MAIL_FRAMESET_NAME, FrameCreator.ExistingFramesetOptions.ReobtainStateFromExistingFrames, false);
+			_creator = new FrameCreator(EXPEDITEE_MAIL_FRAMESET_NAME, FrameIO.MAIL_PATH, EXPEDITEE_MAIL_FRAMESET_NAME, FrameCreator.ExistingFramesetOptions.AppendAfterLastItem, false);
 		}
 				
@@ -107,5 +107,4 @@
 		Mail mail = new Mail(message, message2, options);
 		Text t = mail.getPreviewMessage(true);
-		_previewMessages.add(t);
 		_messages.add(t);
 		_creator.addText(timestamp, Colour.BLACK, null, null, false);
@@ -113,4 +112,6 @@
 			_creator.addItem(line.copy(), false);
 		}
+		t.setLink(_creator.getCurrentFrame().getName());
+		_previewMessages.add(t);
 		_creator.addSpace(SPACING);
 		_creator.save();
Index: trunk/src/org/expeditee/gui/FrameCreator.java
===================================================================
--- trunk/src/org/expeditee/gui/FrameCreator.java	(revision 1279)
+++ trunk/src/org/expeditee/gui/FrameCreator.java	(revision 1280)
@@ -19,8 +19,14 @@
 package org.expeditee.gui;
 
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.util.LinkedList;
 import java.util.List;
 
 import org.expeditee.agents.ExistingFramesetException;
+import org.expeditee.agents.InvalidFramesetNameException;
 import org.expeditee.core.Colour;
 import org.expeditee.items.Item;
@@ -28,5 +34,5 @@
 
 public class FrameCreator {
-	
+
 	public static final int INDENT_FROM_TITLE = 20;
 
@@ -53,10 +59,10 @@
 
 	private boolean _multiColumn;
-	
+
 	public enum ExistingFramesetOptions {
 		/**
-		 * Do not attempt to use any existing frames in specified framesets. 
+		 * Do not attempt to use any existing frames in specified framesets.
 		 */
-		CreateNewFramesOnly,
+		AppendSegregatedFrames,
 		/**
 		 * Override any existing frames in specified framesets.
@@ -64,73 +70,88 @@
 		OverrideExistingFrames,
 		/**
-		 * Use the existing frames in the framesets to reobtain what the state of the FrameCreator should be.
+		 * Use the existing frames in the framesets to reobtain what the state of the
+		 * FrameCreator should be.
 		 */
-		ReobtainStateFromExistingFrames
-	}
-	
+		AppendAfterLastItem
+	}
+
 	private final List<Frame> framesCreated = new LinkedList<Frame>();
 
 	public FrameCreator(String frameTitle) {
-		this(DisplayController.getCurrentFrame().getFramesetName(), DisplayController
-				.getCurrentFrame().getPath(), frameTitle, ExistingFramesetOptions.CreateNewFramesOnly, false);
-	}
-	
+		this(DisplayController.getCurrentFrame().getFramesetName(), DisplayController.getCurrentFrame().getPath(),
+				frameTitle, ExistingFramesetOptions.AppendSegregatedFrames, false);
+	}
+
 	public FrameCreator(String framesetName, String path, String frameTitle, ExistingFramesetOptions establishState, boolean multiColumn) {
-		if (establishState == ExistingFramesetOptions.ReobtainStateFromExistingFrames) {
-			initialiseReobtainState(framesetName, path, frameTitle, establishState, multiColumn);
-		} else {
-			initialiseStandard(framesetName, path, frameTitle, establishState, multiColumn);
-		}
-	}
-	
-	private void initialiseReobtainState(String framesetName, String path, String frameTitle, ExistingFramesetOptions establishState, boolean multiColumn) {
+		switch (establishState) {
+			case OverrideExistingFrames:
+				try {
+					FrameIO.SuspendCache();
+					Path framesetDir = Files.createTempDirectory("temporaryExpediteeFrameset");
+					initialise(framesetName, framesetDir.toAbsolutePath(), frameTitle, multiColumn);
+					FrameIO.EnableCache();
+					FrameIO.deleteFrameset(framesetName);
+					FrameIO.moveFrameset(framesetName, framesetDir.toAbsolutePath().toString() + File.separator, path);
+					_current.setPath(path);
+				} catch (IOException e) {
+					e.printStackTrace();
+				}
+				break;
+			case AppendSegregatedFrames:
+				initialise(framesetName, Paths.get(path), frameTitle, multiColumn);
+				break;
+			case AppendAfterLastItem:
+				initialiseReobtainState(framesetName, Paths.get(path), frameTitle, multiColumn);
+				break;
+		}
+	}
+
+	private void initialiseReobtainState(String framesetName, Path path, String frameTitle, boolean multiColumn) {
 		_multiColumn = multiColumn;
 		_Mnext = createButton("@Next", null, null, 10, 15);
 		_Mprev = createButton("@Previous", null, null, _Mnext.getBoundsWidth() + _Mnext.getAnchorRight() + 20, 15);
 		_Mfirst = createButton("@First", null, null, _Mprev.getBoundsWidth() + _Mprev.getAnchorRight() + 20, 15);
-		
+
 		int lastNumber = FrameIO.getLastNumber(framesetName);
 		for (int i = 1; i <= lastNumber; i++) {
-			Frame frame = FrameIO.LoadFrame(framesetName + i, path);
+			Frame frame = FrameIO.LoadFrame(framesetName + i, path.toAbsolutePath().toString());
 			this.framesCreated.add(frame);
 		}
 		if (this.framesCreated.isEmpty()) {
-			initialiseStandard(framesetName, path, frameTitle, ExistingFramesetOptions.CreateNewFramesOnly, multiColumn);
+			initialise(framesetName, path, frameTitle, multiColumn);
 			return;
 		}
 		_firstFrame = this.framesCreated.get(0);
 		_current = this.framesCreated.get(this.framesCreated.size() - 1);
+
+		createNextFrame();
 		
-		createNextFrame();
-	}
-
-	private void initialiseStandard(String framesetName, String path, String frameTitle, ExistingFramesetOptions establishState,
-			boolean multiColumn) {
+		Paths.get(_current.getFramePathLogical());
+	}
+	
+	private void initialise(String framesetName, Path path, String frameTitle, boolean multiColumn) {
 		_multiColumn = multiColumn;
 		_Mnext = createButton("@Next", null, null, 10, 15);
-
-		_Mprev = createButton("@Previous", null, null, _Mnext.getBoundsWidth()
-				+ _Mnext.getAnchorRight() + 20, 15);
-
-		_Mfirst = createButton("@First", null, null, _Mprev.getBoundsWidth()
-				+ _Mprev.getAnchorRight() + 20, 15);
-
-		Frame toUse = null;
+		_Mprev = createButton("@Previous", null, null, _Mnext.getBoundsWidth() + _Mnext.getAnchorRight() + 20, 15);
+		_Mfirst = createButton("@First", null, null, _Mprev.getBoundsWidth() + _Mprev.getAnchorRight() + 20, 15);
+			
 		try {
-			toUse = FrameIO.CreateFrameset(framesetName, path, establishState == ExistingFramesetOptions.CreateNewFramesOnly ? false : true);
-		} catch (ExistingFramesetException efe) {
-			// Need a comment here to explain why this catch() clause is empty
-			// (or else it should be throwing an exception)
-		} catch (Exception e) {
+			Frame toUse;
+			if (FrameIO.canAccessFrameset(framesetName, path)) {
+				toUse = FrameIO.CreateFrame(framesetName, frameTitle, null);
+			} else {
+				toUse = FrameIO.CreateFrameset(framesetName, path.toAbsolutePath().toString() + File.separator, true);
+			}
+		
+			this.framesCreated.add(toUse);
+			resetGlobals(toUse);
+			_firstFrame = toUse;
+			
+			path.toAbsolutePath().resolve(framesetName);
+		} catch (InvalidFramesetNameException e) {
 			e.printStackTrace();
-		}
-
-		if (toUse == null) {
-			toUse = FrameIO.CreateFrame(framesetName, frameTitle, null);
-			this.framesCreated.add(toUse);
-		}
-
-		resetGlobals(toUse);
-		_firstFrame = toUse;
+		} catch (ExistingFramesetException e) {
+			// This should never happen as we are allowing for an override of existing frameset.
+		}
 	}
 
@@ -141,19 +162,18 @@
 	 *            the caption for the button
 	 * @param x
-	 *            the x position for the button. Null if the button is anchored
-	 *            to the right of the screen.
+	 *            the x position for the button. Null if the button is anchored to
+	 *            the right of the screen.
 	 * @param y
-	 *            the y position for the button. Null if the button is anchored
-	 *            to the bottom of the screen.
+	 *            the y position for the button. Null if the button is anchored to
+	 *            the bottom of the screen.
 	 * @param right
-	 *            the distance the button is anchored from the right of this
-	 *            screen. Null if an absolute position is used.
+	 *            the distance the button is anchored from the right of this screen.
+	 *            Null if an absolute position is used.
 	 * @param bottom
-	 *            the distance the button is to be anchored from the bottom of
-	 *            the screen. Null if the button is given an absolute position.
+	 *            the distance the button is to be anchored from the bottom of the
+	 *            screen. Null if the button is given an absolute position.
 	 * @return the newly created button.
 	 */
-	public static Item createButton(String text, Integer x, Integer y, Integer right,
-			Integer bottom) {
+	public static Item createButton(String text, Integer x, Integer y, Integer right, Integer bottom) {
 		Text button = new Text(text);
 
@@ -180,15 +200,14 @@
 
 	/**
-	 * Creates the next frame in the frameset, with a previous button already
-	 * added and linked to the last frame. _current then gets updated to point
-	 * at the newly created Frame, and _lastY is reset
+	 * Creates the next frame in the frameset, with a previous button already added
+	 * and linked to the last frame. _current then gets updated to point at the
+	 * newly created Frame, and _lastY is reset
 	 */
 	public boolean createNextFrame() {
 		try {
-			Frame newFrame = FrameIO.CreateFrame(_current.getFramesetName(),
-					_current.getTitle(), null);
+			Frame newFrame = FrameIO.CreateFrame(_current.getFramesetName(), _current.getTitle(), null);
 
 			this.framesCreated.add(newFrame);
-			
+
 			// add link to previous frame
 			// _prev =
@@ -211,11 +230,10 @@
 		}
 	}
-	
+
 	public List<Frame> getFramesCreated() {
 		return this.framesCreated;
 	}
 
-	private void resetGlobals(Frame toUse)
-	{
+	private void resetGlobals(Frame toUse) {
 		Text title = toUse.getTitleItem();
 		START_X = INDENT_FROM_TITLE + title.getX();
@@ -227,6 +245,5 @@
 			if (it instanceof Text) {
 				Text t = (Text) it;
-				if (t.getText().toLowerCase().equals("@start")
-						|| t.getText().toLowerCase().startsWith("@start:")) {
+				if (t.getText().toLowerCase().equals("@start") || t.getText().toLowerCase().startsWith("@start:")) {
 					t.stripFirstWord();
 
@@ -253,6 +270,5 @@
 				// if there is no more room on the X axis, we have to start a
 				// new frame
-				if (!_multiColumn
-						|| toAdd.getBoundsWidth() + _lastX > DisplayController.getFramePaintAreaWidth()) {
+				if (!_multiColumn || toAdd.getBoundsWidth() + _lastX > DisplayController.getFramePaintAreaWidth()) {
 					// Make sure text items that are created on the current
 					// frame are removed
@@ -281,6 +297,5 @@
 	}
 
-	public Text addText(String toAdd, Colour c, String link, String action,
-			boolean bSave) {
+	public Text addText(String toAdd, Colour c, String link, String action, boolean bSave) {
 		Text text = _current.createNewText(toAdd);
 		if (c != null)
@@ -297,13 +312,13 @@
 		FrameIO.ForceSaveFrame(_current);
 	}
-	
+
 	public int getLastY() {
 		return _lastY;
 	}
-	
+
 	public void setLastY(int lastY) {
 		_lastY = lastY;
 	}
-	
+
 	public Frame getCurrentFrame() {
 		return _current;
@@ -345,5 +360,6 @@
 		previousButton.setLinkHistory(false);
 		previousButton.setLinkMark(false);
-		// previousButton.setPermission(new PermissionPair(UserAppliedPermission.followLinks));
+		// previousButton.setPermission(new
+		// PermissionPair(UserAppliedPermission.followLinks));
 		current.addItem(previousButton);
 
Index: trunk/src/org/expeditee/gui/FrameIO.java
===================================================================
--- trunk/src/org/expeditee/gui/FrameIO.java	(revision 1279)
+++ trunk/src/org/expeditee/gui/FrameIO.java	(revision 1280)
@@ -1579,12 +1579,21 @@
 	 * @return
 	 */
-	public static Boolean canAccessFrameset(String framesetName) {
+	public static boolean canAccessFrameset(String framesetName) {
 		framesetName = framesetName.toLowerCase();
 		for (String path : FolderSettings.FrameDirs.getAbsoluteDirs()) {
-			if ((new File(path + framesetName)).exists()) {
+			if (canAccessFrameset(framesetName, Paths.get(path))) {
 				return true;
 			}
 		}
 		return false;
+	}
+	
+	public static boolean canAccessFrameset(String framesetName, Path path) {
+		File framesetDir = path.resolve(framesetName).toFile();
+		if (framesetDir.exists() && framesetDir.isDirectory()) {
+			return true;
+		} else {
+			return false;
+		}
 	}
 
@@ -1723,36 +1732,47 @@
 		// Search all the available directories for the directory
 		for (String path : FolderSettings.FrameDirs.getAbsoluteDirs()) {
-			String source = path + framesetName.toLowerCase() + File.separator;
-			File framesetDirectory = new File(source);
-			// Once we have found the directory move it
-			if (framesetDirectory.exists()) {
-				String destPath = destinationFolder
-						+ framesetName.toLowerCase();
-				int copyNumber = 1;
-				File dest = new File(destPath + File.separator);
-				// Create the destination folder if it doesnt already exist
-				if (!dest.getParentFile().exists()) {
-					dest.mkdirs();
+			return moveFrameset(framesetName, path, destinationFolder);
+		}
+		return false;
+	}
+
+	public static boolean moveFrameset(String framesetName, String path, String destinationFolder) {
+		String source = path + framesetName.toLowerCase() + File.separator;
+		File framesetDirectory = new File(source);
+		// Once we have found the directory move it
+		if (framesetDirectory.exists()) {
+			String destPath = destinationFolder
+					+ framesetName.toLowerCase();
+			int copyNumber = 1;
+			File dest = new File(destPath + File.separator);
+			// Create the destination folder if it doesnt already exist
+			if (!dest.getParentFile().exists()) {
+				dest.mkdirs();
+			}
+			// If a frameset with the same name is already in the
+			// destination add
+			// a number to the end
+			while (dest.exists()) {
+				dest = new File(destPath + ++copyNumber + File.separator);
+			}
+			try {
+				copyFileTree(framesetDirectory.toPath(), dest.toPath());	
+			} catch (IOException e) {
+				e.printStackTrace();
+				return false;
+			}
+			
+			for (File f : framesetDirectory.listFiles()) {
+				if (!f.delete()) {
+					return false;
 				}
-				// If a frameset with the same name is already in the
-				// destination add
-				// a number to the end
-				while (dest.exists()) {
-					dest = new File(destPath + ++copyNumber + File.separator);
-				}
-				if (!framesetDirectory.renameTo(dest)) {
-					for (File f : framesetDirectory.listFiles()) {
-						if (!f.delete()) {
-							return false;
-						}
-					}
-					if (!framesetDirectory.delete()) {
-						return false;
-					}
-				}
-				return true;
-			}
-		}
-		return false;
+			}
+			if (!framesetDirectory.delete()) {
+				return false;
+			}
+			return true;
+		} else {
+			return false;
+		}
 	}
 
Index: trunk/src/org/expeditee/settings/Settings.java
===================================================================
--- trunk/src/org/expeditee/settings/Settings.java	(revision 1279)
+++ trunk/src/org/expeditee/settings/Settings.java	(revision 1280)
@@ -230,5 +230,5 @@
 	private static void generateSettingsTree(String page, Text text) {
 		Frame parent = text.getParentOrCurrentFrame();
-		FrameCreator frames = new FrameCreator(parent.getFramesetName(), parent.getPath(), page, FrameCreator.ExistingFramesetOptions.CreateNewFramesOnly, false);
+		FrameCreator frames = new FrameCreator(parent.getFramesetName(), parent.getPath(), page, FrameCreator.ExistingFramesetOptions.AppendSegregatedFrames, false);
 		text.setLink(frames.getName());
 		
