Index: trunk/JavaHelperLib/src/de/ugoe/cs/util/ArrayTools.java
===================================================================
--- trunk/JavaHelperLib/src/de/ugoe/cs/util/ArrayTools.java	(revision 425)
+++ trunk/JavaHelperLib/src/de/ugoe/cs/util/ArrayTools.java	(revision 1)
@@ -1,47 +1,27 @@
 package de.ugoe.cs.util;
 
-/**
- * <p>
- * Helper class that provides methods to simplify working with arrays.
- * </p>
- * 
- * @author Steffen Herbold
- * @version 1.0
- */
 final public class ArrayTools {
-
+	
 	/**
 	 * <p>
-	 * Private constructor to prevent initializing of the class.
-	 * </p>
-	 */
-	private ArrayTools() {
-
-	}
-
-	/**
-	 * <p>
-	 * Finds the first occurrence of an object inside an array.
+	 * Finds the first occurence of an object inside an array.
 	 * </p>
 	 * <p>
-	 * In case {@code other==null}, the first occurrence of a {@code null} value
-	 * in the array is returned.
+	 * In case {@code other==null}, the first occurence of a {@code null} value in the array is returned.
 	 * </p>
-	 * 
-	 * @param array
-	 *            the array
-	 * @param other
-	 *            the object
+	 *  
+	 * @param array the array
+	 * @param other the object
 	 * @return index of the object if found, -1 otherwise
 	 */
 	public static int findIndex(Object[] array, Object other) {
 		int retVal = -1;
-		for (int i = 0; i < array.length && retVal == -1; i++) {
-			if (other != null) {
-				if (array[i] != null && array[i].equals(other)) {
+		for( int i=0 ; i<array.length && retVal==-1 ; i++ ) {
+			if( other!=null ) {
+				if( array[i]!=null && array[i].equals(other) ) {
 					retVal = i;
 				}
 			} else {
-				if (array[i] == null) {
+				if( array[i]==null ) {
 					retVal = i;
 				}
@@ -50,67 +30,3 @@
 		return retVal;
 	}
-
-	/**
-	 * <p>
-	 * Finds the highest element in an array. If multiple elements have the
-	 * maximum value, the index of the first one is returned; null-values are
-	 * ignored. In case the parameter array is null, has length 0 or contains
-	 * only null-values, -1 is returned.
-	 * </p>
-	 * 
-	 * @param <T>
-	 * @param array
-	 *            the array
-	 * @return index of the element with the highest value, -1 in case of an
-	 *         invalid parameter
-	 */
-	@SuppressWarnings("unchecked")
-	public static <T> int findMax(Comparable<T>[] array) {
-		int maxIndex = -1;
-		T maxElement = null;
-		if (array != null) {
-			for (int i = 0; i < array.length; i++) {
-				if (array[i] != null) {
-					if (maxElement == null
-							|| array[i].compareTo(maxElement) > 0) {
-						maxElement = (T) array[i];
-						maxIndex = i;
-					}
-				}
-			}
-		}
-		return maxIndex;
-	}
-
-	/**
-	 * <p>
-	 * Finds the lowest element in an array. If multiple elements have the
-	 * minimal value, the index of the first one is returned; null-values are
-	 * ignored. In case the parameter array is null, has length 0 or contains
-	 * only null-values, -1 is returned.
-	 * </p>
-	 * 
-	 * @param <T>
-	 * @param array
-	 *            the array
-	 * @return index of the element with the lowest value, -1 in case of an
-	 *         invalid parameter
-	 */
-	@SuppressWarnings("unchecked")
-	public static <T> int findMin(Comparable<T>[] array) {
-		int maxIndex = -1;
-		T maxElement = null;
-		if (array != null) {
-			for (int i = 0; i < array.length; i++) {
-				if (array[i] != null) {
-					if (maxElement == null
-							|| array[i].compareTo(maxElement) < 0) {
-						maxElement = (T) array[i];
-						maxIndex = i;
-					}
-				}
-			}
-		}
-		return maxIndex;
-	}
 }
Index: trunk/JavaHelperLib/src/de/ugoe/cs/util/FileTools.java
===================================================================
--- trunk/JavaHelperLib/src/de/ugoe/cs/util/FileTools.java	(revision 425)
+++ 	(revision )
@@ -1,88 +1,0 @@
-package de.ugoe.cs.util;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.nio.charset.Charset;
-
-/**
- * <p>
- * Helper class that provides methods that simplify working with files.
- * </p>
- * 
- * @author Steffen Herbold
- * @version 1.0
- */
-public class FileTools {
-
-	/**
-	 * <p>
-	 * Private constructor to prevent initializing of the class.
-	 * </p>
-	 */
-	private FileTools() {
-
-	}
-
-	/**
-	 * <p>
-	 * Returns an array of the lines contained in a file. The line separator is
-	 * {@link StringTools#ENDLINE}.
-	 * </p>
-	 * 
-	 * @param filename
-	 *            name of the file
-	 * @return string array, where each line contains a file
-	 * @throws IOException
-	 *             see {@link FileReader#read(char[])},
-	 *             {@link FileReader#close()}
-	 * @throws FileNotFoundException
-	 *             see {@link FileReader#FileReader(File)}
-	 */
-	public static String[] getLinesFromFile(String filename)
-			throws IOException, FileNotFoundException {
-		boolean carriageReturn = true;
-		if( StringTools.ENDLINE.equals("\n") ) {
-			carriageReturn = false;
-		}
-		return getLinesFromFile(filename, carriageReturn);
-	}
-
-	/**
-	 * <p>
-	 * Returns an array of the lines contained in a file.
-	 * </p>
-	 * 
-	 * @param filename
-	 *            name of the file
-	 * @param carriageReturn
-	 *            if true, "\r\n", if false "\n" is used as line separator
-	 * @return string array, where each line contains a file
-	 * @throws IOException
-	 *             see {@link FileReader#read(char[])},
-	 *             {@link FileReader#close()}
-	 * @throws FileNotFoundException
-	 *             see {@link FileReader#FileReader(File)}
-	 */
-	public static String[] getLinesFromFile(String filename,
-			boolean carriageReturn) throws IOException, FileNotFoundException {
-		File f = new File(filename);
-		FileInputStream fis = new FileInputStream(f);
-		InputStreamReader reader = new InputStreamReader(fis,
-				Charset.defaultCharset());
-		char[] buffer = new char[(int) f.length()];
-		reader.read(buffer);
-		reader.close();
-		String splitString;
-		if (carriageReturn) {
-			splitString = "\r\n";
-		} else {
-			splitString = "\n";
-		}
-		return (new String(buffer)).split(splitString);
-	}
-
-}
Index: trunk/JavaHelperLib/src/de/ugoe/cs/util/StringTools.java
===================================================================
--- trunk/JavaHelperLib/src/de/ugoe/cs/util/StringTools.java	(revision 425)
+++ trunk/JavaHelperLib/src/de/ugoe/cs/util/StringTools.java	(revision 1)
@@ -1,52 +1,27 @@
 package de.ugoe.cs.util;
 
-/**
- * <p>
- * Helper class that provides methods to simplify working with {@link String}s.
- * </p>
- * 
- * @author Steffen Herbold
- * @version 1.0
- */
 final public class StringTools {
 
+	public final static String ENDLINE = System.getProperty("line.separator");
+	
 	/**
 	 * <p>
-	 * Private constructor to prevent initializing of the class.
-	 * </p>
-	 */
-	private StringTools() {
-
-	}
-
-	/**
-	 * <p>
-	 * Simplifies use of operation system specific line separators.
-	 * </p>
-	 */
-	public final static String ENDLINE = System.getProperty("line.separator");
-
-	/**
-	 * <p>
-	 * Replaces all occurrences of {@literal &, <, >, ', and "} with their
-	 * respective XML entities {@literal &amp;, &lt;, &gt;, &apos;, and &quot;}
+	 * Replaces all occurences of {@literal &, <, >, ', and "} with their
+	 * respective XML entites {@literal &amp;, &lt;, &gt;, &apos;, and &quot;}
 	 * without destroying already existing entities.
 	 * </p>
 	 * 
 	 * @param str
-	 *            String where the XML entities are to be replaced
-	 * @return new String, where the XML entities are used instead of the
+	 *            String where the XML entites are to be replaced
+	 * @return new String, where the XML entites are used instead of the
 	 *         literals
 	 */
 	public static String xmlEntityReplacement(String str) {
 		String result = str;
-		if (result != null && !"".equals(result)) {
-			result = result
-					.replaceAll("&(?!(?:lt|gt|apos|quot|amp);)", "&amp;");
-			result = result.replaceAll("<", "&lt;");
-			result = result.replaceAll(">", "&gt;");
-			result = result.replaceAll("'", "&apos;");
-			result = result.replaceAll("\"", "&quot;");
-		}
+		result = result.replaceAll("&(?!(?:lt|gt|apos|quot|amp);)", "&amp;");
+		result = result.replaceAll("<", "&lt;");
+		result = result.replaceAll(">", "&gt;");
+		result = result.replaceAll("'", "&apos;");
+		result = result.replaceAll("\"", "&quot;");
 		return result;
 	}
Index: trunk/JavaHelperLib/src/de/ugoe/cs/util/console/Command.java
===================================================================
--- trunk/JavaHelperLib/src/de/ugoe/cs/util/console/Command.java	(revision 425)
+++ trunk/JavaHelperLib/src/de/ugoe/cs/util/console/Command.java	(revision 1)
@@ -11,5 +11,4 @@
  * 
  * @author Steffen Herbold
- * @version 1.0
  */
 public interface Command {
Index: trunk/JavaHelperLib/src/de/ugoe/cs/util/console/CommandExecuter.java
===================================================================
--- trunk/JavaHelperLib/src/de/ugoe/cs/util/console/CommandExecuter.java	(revision 425)
+++ trunk/JavaHelperLib/src/de/ugoe/cs/util/console/CommandExecuter.java	(revision 1)
@@ -4,4 +4,5 @@
 import java.util.ArrayList;
 import java.util.List;
+
 
 /**
@@ -13,9 +14,8 @@
  * </p>
  * <p>
- * This class is implemented as a <i>Singleton</i>.
+ * This class is implemented as a <i>Singleton</i>. 
  * </p>
  * 
  * @author Steffen Herbold
- * @version 1.0
  */
 public class CommandExecuter {
@@ -34,5 +34,5 @@
 	 */
 	private static final String cmdPrefix = "CMD";
-
+	
 	/**
 	 * <p>
@@ -48,6 +48,6 @@
 	 * </p>
 	 * <p>
-	 * The de.ugoe.cs.util.console.defaultcommands package has always lowest
-	 * priority, unless it is specifically added.
+	 * The defaultcommands package has always lowest priority, unless it is
+	 * specificially added.
 	 * </p>
 	 */
@@ -78,18 +78,11 @@
 	/**
 	 * <p>
-	 * Adds a package that will be used by {@link #exec(String)} to load command
-	 * from.
+	 * Adds a package that will be used by exec to load command from.
 	 * </p>
 	 * 
 	 * @param pkg
 	 *            package where commands are located
-	 * @throws InvalidParameterException
-	 *             thrown if the package name is null or empty string
 	 */
 	public void addCommandPackage(String pkg) {
-		if ("".equals(pkg) || pkg == null) {
-			throw new InvalidParameterException(
-					"package name must not be null or empty string");
-		}
 		commandPackageList.add(pkg);
 	}
@@ -114,15 +107,12 @@
 	 */
 	public void exec(String command) {
-		Console.commandNotification(command);
 		Command cmd = null;
 		CommandParser parser = new CommandParser();
 		parser.parse(command);
 		for (int i = 0; cmd == null && i < commandPackageList.size(); i++) {
-			cmd = loadCMD(commandPackageList.get(i) + "." + cmdPrefix
-					+ parser.getCommandName());
+			cmd = loadCMD(commandPackageList.get(i)+"."+cmdPrefix+parser.getCommandName());
 		}
 		if (cmd == null) { // check if command is available as default command
-			cmd = loadCMD(defaultPackage + "." + cmdPrefix
-					+ parser.getCommandName());
+			cmd = loadCMD(defaultPackage+"."+cmdPrefix+parser.getCommandName());
 		}
 		if (cmd == null) {
@@ -138,12 +128,8 @@
 
 	/**
-	 * <p>
 	 * Helper method that loads a class and tries to cast it to {@link Command}.
-	 * </p>
 	 * 
-	 * @param className
-	 *            qualified name of the class (including package name)
-	 * @return if class is available and implement {@link Command} and instance
-	 *         of the class, null otherwise
+	 * @param className qualified name of the class (including package name)
+	 * @return if class is available and implement {@link Command} and instance of the class, null otherwise
 	 */
 	private Command loadCMD(String className) {
@@ -154,7 +140,6 @@
 		} catch (NoClassDefFoundError e) {
 			String[] splitResult = e.getMessage().split("CMD");
-			String correctName = splitResult[splitResult.length - 1].replace(
-					")", "");
-			Console.println("Did you mean " + correctName + "?");
+			String correctName = splitResult[splitResult.length-1].replace(")", "");
+			Console.traceln("Did you mean " + correctName + "?");
 		} catch (ClassNotFoundException e) {
 		} catch (IllegalAccessException e) {
Index: trunk/JavaHelperLib/src/de/ugoe/cs/util/console/CommandParser.java
===================================================================
--- trunk/JavaHelperLib/src/de/ugoe/cs/util/console/CommandParser.java	(revision 425)
+++ trunk/JavaHelperLib/src/de/ugoe/cs/util/console/CommandParser.java	(revision 1)
@@ -10,5 +10,4 @@
  * 
  * @author Steffen Herbold
- * @version 1.0
  */
 public class CommandParser {
@@ -55,5 +54,5 @@
 	 * </p>
 	 * 
-	 * @return {@link List} of parameters that were parsed.
+	 * @return
 	 */
 	public List<Object> getParameters() {
@@ -145,5 +144,5 @@
 					startArrayparameter = false;
 				}
-				if (i < commandChars.length && quote && !startArrayparameter && commandChars[i] == '\'') {
+				if (i < commandChars.length && quote && commandChars[i] == '\'') {
 					// end of parameter with '
 					i++; // skip '
@@ -152,5 +151,5 @@
 					arrayBuffer.add((new String(buffer)).trim());
 				}
-				if (i < commandChars.length && !quote && !startArrayparameter
+				if (i < commandChars.length && !quote
 						&& Character.isWhitespace(commandChars[i])) {
 					startArrayparameter = true;
@@ -190,6 +189,6 @@
 		if (bufferPos > 0) {
 			if (isArray) {
-				//arrayBuffer.add((new String(buffer)).trim());
-				parameters.add(arrayBuffer.toArray(new String[0]));
+				arrayBuffer.add((new String(buffer)).trim());
+				parameters.add(arrayBuffer);
 			}
 			if (isString) {
Index: trunk/JavaHelperLib/src/de/ugoe/cs/util/console/Console.java
===================================================================
--- trunk/JavaHelperLib/src/de/ugoe/cs/util/console/Console.java	(revision 425)
+++ trunk/JavaHelperLib/src/de/ugoe/cs/util/console/Console.java	(revision 1)
@@ -1,13 +1,9 @@
 package de.ugoe.cs.util.console;
 
-import java.util.Collection;
-import java.util.LinkedHashSet;
+import java.util.ArrayList;
+import java.util.List;
 
 import de.ugoe.cs.util.StringTools;
-import de.ugoe.cs.util.console.listener.ICommandListener;
-import de.ugoe.cs.util.console.listener.IErrorListener;
-import de.ugoe.cs.util.console.listener.IExceptionListener;
-import de.ugoe.cs.util.console.listener.IOutputListener;
-import de.ugoe.cs.util.console.listener.ITraceListener;
+
 
 /**
@@ -27,5 +23,4 @@
  * 
  * @author Steffen Herbold
- * @version 1.0
  */
 public final class Console {
@@ -33,36 +28,8 @@
 	/**
 	 * <p>
-	 * Listeners for the output stream.
-	 * </p>
-	 */
-	private Collection<IOutputListener> outputListener;
-
-	/**
-	 * <p>
-	 * Listeners for the error stream.
-	 * </p>
-	 */
-	private Collection<IErrorListener> errorListener;
-
-	/**
-	 * <p>
-	 * Listeners for the trace stream.
-	 * </p>
-	 */
-	private Collection<ITraceListener> traceListener;
-
-	/**
-	 * <p>
-	 * Listeners for the command stream.
-	 * </p>
-	 */
-	private Collection<ICommandListener> commandListener;
-
-	/**
-	 * <p>
-	 * Listeners for the exception stream.
-	 * </p>
-	 */
-	private Collection<IExceptionListener> exceptionListener;
+	 * List of observers.
+	 * </p>
+	 */
+	private List<ConsoleObserver> observers;
 
 	/**
@@ -71,5 +38,5 @@
 	 * </p>
 	 */
-	private static Console theInstance = new Console();
+	private static Console theInstance = null;
 
 	/**
@@ -82,4 +49,7 @@
 	 */
 	public static Console getInstance() {
+		if (theInstance == null) {
+			theInstance = new Console();
+		}
 		return theInstance;
 	}
@@ -87,32 +57,9 @@
 	/**
 	 * <p>
-	 * Resets the Console by creating a new instance that has no registered
-	 * observers.
-	 * </p>
-	 */
-	public static void reset() {
-		theInstance.init();
-	}
-
-	/**
-	 * <p>
 	 * Creates a new Console. Private to prevent multiple instances (Singleton).
 	 * </p>
 	 */
 	private Console() {
-		init();
-	}
-
-	/**
-	 * <p>
-	 * Initializes the console.
-	 * </p>
-	 */
-	private void init() {
-		outputListener = new LinkedHashSet<IOutputListener>();
-		errorListener = new LinkedHashSet<IErrorListener>();
-		traceListener = new LinkedHashSet<ITraceListener>();
-		commandListener = new LinkedHashSet<ICommandListener>();
-		exceptionListener = new LinkedHashSet<IExceptionListener>();
+		observers = new ArrayList<ConsoleObserver>();
 	}
 
@@ -122,74 +69,9 @@
 	 * </p>
 	 * 
-	 * @deprecated use registerXYZListener instead
 	 * @param observer
 	 *            observer to be added
 	 */
 	public void registerObserver(ConsoleObserver observer) {
-		registerOutputListener(observer);
-		registerErrorListener(observer);
-		registerTraceListener(observer);
-		registerCommandListener(observer);
-		registerExceptionListener(observer);
-	}
-
-	/**
-	 * <p>
-	 * Registers an output listener.
-	 * </p>
-	 * 
-	 * @param listener
-	 *            listener that is registered
-	 */
-	public void registerOutputListener(IOutputListener listener) {
-		outputListener.add(listener);
-	}
-
-	/**
-	 * <p>
-	 * Registers an error listener.
-	 * </p>
-	 * 
-	 * @param listener
-	 *            listener that is registered
-	 */
-	public void registerErrorListener(IErrorListener listener) {
-		errorListener.add(listener);
-	}
-
-	/**
-	 * <p>
-	 * Registers a trace listener.
-	 * </p>
-	 * 
-	 * @param listener
-	 *            listener that is registered
-	 */
-	public void registerTraceListener(ITraceListener listener) {
-		traceListener.add(listener);
-	}
-
-	/**
-	 * <p>
-	 * Registers a command listener.
-	 * </p>
-	 * 
-	 * @param listener
-	 *            listener that is registered
-	 */
-	public void registerCommandListener(ICommandListener listener) {
-		commandListener.add(listener);
-	}
-
-	/**
-	 * <p>
-	 * Registers an exception listener.
-	 * </p>
-	 * 
-	 * @param listener
-	 *            listener that is registered
-	 */
-	public void registerExceptionListener(IExceptionListener listener) {
-		exceptionListener.add(listener);
+		observers.add(observer);
 	}
 
@@ -199,139 +81,9 @@
 	 * </p>
 	 * 
-	 * @deprecated use removeXYZListener instead
 	 * @param observer
 	 *            observer to be removed
 	 */
 	public void deleteObserver(ConsoleObserver observer) {
-		removeOutputListener(observer);
-		removeErrorListener(observer);
-		removeTraceListener(observer);
-		removeCommandListener(observer);
-		removeExceptionListener(observer);
-	}
-
-	/**
-	 * <p>
-	 * Removes an output listener.
-	 * </p>
-	 * 
-	 * @param listener
-	 *            listener that is removed
-	 */
-	public void removeOutputListener(IOutputListener listener) {
-		outputListener.remove(listener);
-	}
-
-	/**
-	 * <p>
-	 * Removes an error listener.
-	 * </p>
-	 * 
-	 * @param listener
-	 *            listener that is removed
-	 */
-	public void removeErrorListener(IErrorListener listener) {
-		errorListener.remove(listener);
-	}
-
-	/**
-	 * <p>
-	 * Removes an trace listener.
-	 * </p>
-	 * 
-	 * @param listener
-	 *            listener that is removed
-	 */
-	public void removeTraceListener(ITraceListener listener) {
-		traceListener.remove(listener);
-	}
-
-	/**
-	 * <p>
-	 * Removes a command listener.
-	 * </p>
-	 * 
-	 * @param listener
-	 *            listener that is removed
-	 */
-	public void removeCommandListener(ICommandListener listener) {
-		commandListener.remove(listener);
-	}
-
-	/**
-	 * <p>
-	 * Removes an exception listener.
-	 * </p>
-	 * 
-	 * @param listener
-	 *            listener that is removed
-	 */
-	public void removeExceptionListener(IExceptionListener listener) {
-		exceptionListener.remove(listener);
-	}
-
-	/**
-	 * <p>
-	 * Checks if a listener is registered.
-	 * </p>
-	 * 
-	 * @param listener
-	 *            listener that is checked
-	 * @return true, is listener is registered; false, otherwise
-	 */
-	public boolean hasOutputListener(IOutputListener listener) {
-		return outputListener.contains(listener);
-	}
-
-	/**
-	 * <p>
-	 * Checks if a listener is registered.
-	 * </p>
-	 * 
-	 * @param listener
-	 *            listener that is checked
-	 * @return true, is listener is registered; false, otherwise
-	 */
-	public boolean hasErrorListener(IErrorListener listener) {
-		return errorListener.contains(listener);
-	}
-
-	/**
-	 * <p>
-	 * Checks if a listener is registered.
-	 * </p>
-	 * 
-	 * @param listener
-	 *            listener that is checked
-	 * @return true, is listener is registered; false, otherwise
-	 */
-	public boolean hasTraceListener(ITraceListener listener) {
-		return traceListener.contains(listener);
-	}
-
-	/**
-	 * <p>
-	 * Checks if a listener is registered.
-	 * </p>
-	 * 
-	 * @param listener
-	 *            listener that is checked
-	 * @return true, is listener is registered; false, otherwise
-	 */
-	public boolean hasCommandListener(ICommandListener listener) {
-		return commandListener.contains(listener);
-	}
-
-	/**
-	 * <p>
-	 * Checks if a listener is registered.
-	 * </p>
-	 * 
-	 * @param listener
-	 *            listener that is checked
-	 * @return true, is listener is registered; false, otherwise
-	 */
-	public boolean hasExceptionListener(IExceptionListener listener) {
-		return exceptionListener.contains(listener);
+		observers.remove(observer);
 	}
 
@@ -346,6 +98,9 @@
 	 */
 	public static void print(String msg) {
-		for (IOutputListener observer : theInstance.outputListener) {
-			observer.outputMsg(msg);
+		if (theInstance == null) {
+			getInstance();
+		}
+		for (ConsoleObserver observer : theInstance.observers) {
+			observer.updateText(msg);
 		}
 	}
@@ -361,6 +116,10 @@
 	 */
 	public static void println(String msg) {
-		for (IOutputListener observer : theInstance.outputListener) {
-			observer.outputMsg(msg + StringTools.ENDLINE);
+		if (theInstance == null) {
+			getInstance();
+		}
+		for (ConsoleObserver observer : theInstance.observers) {
+			observer.updateText(msg
+					+ StringTools.ENDLINE);
 		}
 	}
@@ -376,6 +135,9 @@
 	 */
 	public static void printerr(String errMsg) {
-		for (IErrorListener observer : theInstance.errorListener) {
-			observer.errorMsg(errMsg);
+		if (theInstance == null) {
+			getInstance();
+		}
+		for (ConsoleObserver observer : theInstance.observers) {
+			observer.errStream(errMsg);
 		}
 	}
@@ -391,6 +153,10 @@
 	 */
 	public static void printerrln(String errMsg) {
-		for (IErrorListener observer : theInstance.errorListener) {
-			observer.errorMsg(errMsg + StringTools.ENDLINE);
+		if (theInstance == null) {
+			getInstance();
+		}
+		for (ConsoleObserver observer : theInstance.observers) {
+			observer.errStream(errMsg
+					+ StringTools.ENDLINE);
 		}
 	}
@@ -404,7 +170,10 @@
 	 *            exception whose stack trace is to be printed
 	 */
-	public static void logException(Exception e) {
-		for (IExceptionListener observer : theInstance.exceptionListener) {
-			observer.logException(e);
+	public static void printStacktrace(Exception e) {
+		if (theInstance == null) {
+			getInstance();
+		}
+		for (ConsoleObserver observer : theInstance.observers) {
+			observer.printStacktrace(e);
 		}
 	}
@@ -420,6 +189,9 @@
 	 */
 	public static void trace(String traceMsg) {
-		for (ITraceListener observer : theInstance.traceListener) {
-			observer.traceMsg(traceMsg);
+		if (theInstance == null) {
+			getInstance();
+		}
+		for (ConsoleObserver observer : theInstance.observers) {
+			observer.trace(traceMsg);
 		}
 	}
@@ -428,6 +200,5 @@
 	 * <p>
 	 * Sends a debug message to all observers containing the message that was
-	 * passed to this function and adds an {@link StringTools#ENDLINE} to the
-	 * message.
+	 * passed to this function and adds an endline to the message.
 	 * </p>
 	 * 
@@ -436,20 +207,10 @@
 	 */
 	public static void traceln(String traceMsg) {
-		for (ITraceListener observer : theInstance.traceListener) {
-			observer.traceMsg(traceMsg + StringTools.ENDLINE);
-		}
-	}
-
-	/**
-	 * <p>
-	 * Called by {@link CommandExecuter#exec(String)}.
-	 * </p>
-	 * 
-	 * @param command
-	 *            command that is executed
-	 */
-	static void commandNotification(String command) {
-		for (ICommandListener observer : theInstance.commandListener) {
-			observer.commandNotification(command);
+		if (theInstance == null) {
+			getInstance();
+		}
+		for (ConsoleObserver observer : theInstance.observers) {
+			observer.trace(traceMsg
+					+ StringTools.ENDLINE);
 		}
 	}
Index: trunk/JavaHelperLib/src/de/ugoe/cs/util/console/ConsoleObserver.java
===================================================================
--- trunk/JavaHelperLib/src/de/ugoe/cs/util/console/ConsoleObserver.java	(revision 425)
+++ trunk/JavaHelperLib/src/de/ugoe/cs/util/console/ConsoleObserver.java	(revision 1)
@@ -1,9 +1,3 @@
 package de.ugoe.cs.util.console;
-
-import de.ugoe.cs.util.console.listener.ICommandListener;
-import de.ugoe.cs.util.console.listener.IErrorListener;
-import de.ugoe.cs.util.console.listener.IExceptionListener;
-import de.ugoe.cs.util.console.listener.IOutputListener;
-import de.ugoe.cs.util.console.listener.ITraceListener;
 
 /**
@@ -13,8 +7,47 @@
  * 
  * @author Steffen Herbold
- * @version 2.0
- * @deprecated Use listeners defined in the package de.ugoe.cs.console.listeners instead.
  */
-public interface ConsoleObserver extends ITraceListener, IOutputListener, IErrorListener, ICommandListener, IExceptionListener {
+public interface ConsoleObserver {
+
+	/**
+	 * <p>
+	 * If a new message is send to the console, all observers are updated using
+	 * this method.
+	 * </p>
+	 * 
+	 * @param newMessage
+	 *            message that was send to the console.
+	 */
+	public void updateText(String newMessage);
+
+	/**
+	 * <p>
+	 * Send messages to the error stream of all observers.
+	 * </p>
+	 * 
+	 * @param errMessage
+	 *            error message
+	 */
+	public void errStream(String errMessage);
+
+	/**
+	 * <p>
+	 * Send messages to the trace stream of all observers.
+	 * </p>
+	 * 
+	 * @param traceMesssage
+	 *            error message
+	 */
+	public void trace(String traceMessage);
+
+	/**
+	 * <p>
+	 * Prints the stack trace of an exception.
+	 * </p>
+	 * 
+	 * @param e
+	 *            exception whose stack trace is to be printed
+	 */
+	public void printStacktrace(Exception e);
 
 }
Index: trunk/JavaHelperLib/src/de/ugoe/cs/util/console/FileOutputListener.java
===================================================================
--- trunk/JavaHelperLib/src/de/ugoe/cs/util/console/FileOutputListener.java	(revision 425)
+++ 	(revision )
@@ -1,126 +1,0 @@
-package de.ugoe.cs.util.console;
-
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-
-import de.ugoe.cs.util.console.listener.IOutputListener;
-
-/**
- * <p>
- * Implements an {@link IOutputListener} for the {@link Console} that logs all
- * outputs in a file. This can be used to "pipe" the output-stream of the
- * console into a file. The advantage of using this mechanism for piping is that
- * the file will only contain the output stream. No errors, no commands, etc.
- * </p>
- * 
- * @author Steffen Herbold
- * @version 1.0
- */
-public class FileOutputListener implements IOutputListener {
-
-	/**
-	 * <p>
-	 * Flag that ensures that only one log message is produced if the listener
-	 * breaks, e.g., because of a full hard disk/quota.
-	 * </p>
-	 */
-	boolean failureLogged = false;
-
-	/**
-	 * <p>
-	 * Name of the output file.
-	 * </p>
-	 */
-	String filename;
-
-	/**
-	 * <p>
-	 * Writer for the output.
-	 * </p>
-	 */
-	OutputStreamWriter writer = null;
-
-	/**
-	 * <p>
-	 * Constructor. Creates a new FileOutputListener.
-	 * </p>
-	 * 
-	 * @param filename
-	 *            name and path of the file the listener writes to.
-	 */
-	public FileOutputListener(String filename) {
-		this.filename = filename;
-
-	}
-
-	/**
-	 * <p>
-	 * Starts the listener by opening the file and registering it with the
-	 * {@link Console}.
-	 * </p>
-	 */
-	public void start() {
-		try {
-			FileOutputStream fos = new FileOutputStream(filename);
-			writer = new OutputStreamWriter(fos, "UTF-8");
-			Console.getInstance().registerOutputListener(this);
-		} catch (IOException e) {
-			Console.printerrln("Failed to start FileOutputListener for file "
-					+ filename + ": " + e.getMessage());
-		}
-	}
-
-	/**
-	 * <p>
-	 * Stops the listener by closing the file and removing itself from the
-	 * {@link Console}.
-	 * </p>
-	 */
-	public void stop() {
-		Console.getInstance().removeOutputListener(this);
-		if( writer!=null ) {
-			try {
-				writer.close();
-				writer = null;
-			} catch (IOException e) {
-				Console.printerrln("Failed to close file " + filename + ": "
-						+ e.getMessage());
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * de.ugoe.cs.util.console.listener.IOutputListener#outputMsg(java.lang.
-	 * String)
-	 */
-	@Override
-	public void outputMsg(String newMessage) {
-		if( writer!=null ) {
-			try {
-				writer.write(newMessage);
-			} catch (IOException e) {
-				if (!failureLogged) {
-					Console.printerrln("FileOutpustListener for file " + filename
-							+ " broken: " + e.getMessage());
-					failureLogged = true;
-				}
-			}
-		}
-	}
-
-	/**
-	 * <p>
-	 * Returns the name of the log file used by this listener.
-	 * </p>
-	 * 
-	 * @return name of the log file
-	 */
-	public String getFilename() {
-		return filename;
-	}
-
-}
Index: trunk/JavaHelperLib/src/de/ugoe/cs/util/console/TextConsole.java
===================================================================
--- trunk/JavaHelperLib/src/de/ugoe/cs/util/console/TextConsole.java	(revision 425)
+++ trunk/JavaHelperLib/src/de/ugoe/cs/util/console/TextConsole.java	(revision 1)
@@ -2,22 +2,15 @@
 
 import java.io.IOException;
-import java.nio.charset.Charset;
-
-import de.ugoe.cs.util.console.listener.IErrorListener;
-import de.ugoe.cs.util.console.listener.IExceptionListener;
-import de.ugoe.cs.util.console.listener.IOutputListener;
-import de.ugoe.cs.util.console.listener.ITraceListener;
 
 /**
  * <p>
  * Implements a simple console observer that prints normal text to
- * {@code stdout}, errors to {@code stderr} and reads from {@code stdin}.
+ * <code>stdout</code>, errors to <code>stderr</code> and reads from
+ * <code>stdin</code>.
  * </p>
  * 
  * @author Steffen Herbold
- * @version 1.0
  */
-public class TextConsole implements IOutputListener, IErrorListener,
-		ITraceListener, IExceptionListener {
+public class TextConsole implements ConsoleObserver {
 
 	/**
@@ -34,18 +27,15 @@
 	 */
 	public TextConsole() {
-		Console.getInstance().registerOutputListener(this);
-		Console.getInstance().registerErrorListener(this);
-		Console.getInstance().registerTraceListener(this);
-		Console.getInstance().registerExceptionListener(this);
+		Console.getInstance().registerObserver(this);
 	}
 
 	/**
 	 * <p>
-	 * Prints messages to {@code stdout}.
+	 * Prints messages to <code>stdout</code>.
 	 * </p>
 	 * 
-	 * @see ConsoleObserver#outputMsg(java.lang.String)
+	 * @see ConsoleObserver#updateText(java.lang.String)
 	 */
-	public void outputMsg(String newMessage) {
+	public void updateText(String newMessage) {
 		System.out.print(newMessage);
 	}
@@ -53,11 +43,11 @@
 	/**
 	 * <p>
-	 * Prints messages to {@code stderr}.
+	 * Prints messages to <code>stderr</code>.
 	 * </p>
 	 * 
-	 * @see ConsoleObserver#errorMsg(String)
+	 * @see ConsoleObserver#errStream(String)
 	 */
 	@Override
-	public void errorMsg(String errMessage) {
+	public void errStream(String errMessage) {
 		System.err.print(errMessage);
 	}
@@ -65,22 +55,22 @@
 	/**
 	 * <p>
-	 * Prints the stacktrace of an exception to {@code stderr}.
+	 * Prints the stackrace of an exception to <code>stderr</code>
 	 * </p>
 	 * 
-	 * @see ConsoleObserver#logException(Exception)
+	 * @see ConsoleObserver#printStacktrace(Exception)
 	 */
 	@Override
-	public void logException(Exception e) {
-		System.err.println(e.getMessage());
+	public void printStacktrace(Exception e) {
+		e.printStackTrace();
 	}
 
 	/**
 	 * <p>
-	 * Prints messages to {@code stdout}. These messages are only printed, if
-	 * the console is run in debug mode.
+	 * Prints messages to <code>stdout</code>. These messages are only printed,
+	 * if the console is run in debug mode.
 	 * </p>
 	 */
 	@Override
-	public void traceMsg(String traceMessage) {
+	public void trace(String traceMessage) {
 		if (debugMode) {
 			System.out.print(traceMessage);
@@ -92,5 +82,5 @@
 	 * Starts a new TextConsole. If the text console is started, it can be used
 	 * not only to print message, but also to execute commands by reading
-	 * {@code stdin}.
+	 * <code>stdin</code>.
 	 * </p>
 	 * 
@@ -113,5 +103,5 @@
 	/**
 	 * <p>
-	 * Reads a new command from {@code stdin}.
+	 * Reads a new command from <code>stdin</code>.
 	 * </p>
 	 * 
@@ -120,30 +110,10 @@
 	protected String getCommand() {
 		byte[] buffer = new byte[1024];
-		int bytesRead = 0;
-		String command;
 		try {
-			bytesRead = System.in.read(buffer);
+			System.in.read(buffer);
 		} catch (IOException e) {
 
 		}
-		if (bytesRead == 0) {
-			command = "";
-		} else {
-			command = new String(buffer, Charset.defaultCharset());
-		}
-		return command;
+		return new String(buffer);
 	}
-
-	/**
-	 * <p>
-	 * Configures if the debug mode of the text console is enabled.
-	 * </p>
-	 * 
-	 * @param debug
-	 *            if true, debug mode is enabled.
-	 */
-	public void setDebug(boolean debug) {
-		debugMode = debug;
-	}
-
 }
Index: trunk/JavaHelperLib/src/de/ugoe/cs/util/console/defaultcommands/CMDexec.java
===================================================================
--- trunk/JavaHelperLib/src/de/ugoe/cs/util/console/defaultcommands/CMDexec.java	(revision 425)
+++ trunk/JavaHelperLib/src/de/ugoe/cs/util/console/defaultcommands/CMDexec.java	(revision 1)
@@ -2,8 +2,7 @@
 
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.FileNotFoundException;
+import java.io.FileReader;
 import java.io.IOException;
-import java.io.InputStreamReader;
 import java.security.InvalidParameterException;
 import java.util.List;
@@ -15,17 +14,22 @@
 /**
  * <p>
- * Command to execute a batch of {@link Command}s. The batch is defined as a
- * text file, where each line defines one command.
+ * Implements a command to execute batchs of {@link Command}s, defined by batch
+ * file, to allow scripted executions.
  * </p>
  * 
  * @author Steffen Herbold
- * @version 1.0
  */
 public class CMDexec implements Command {
 
-	/*
-	 * (non-Javadoc)
+	/**
+	 * <p>
+	 * Executes a batch of {@link Command}s that are listed line by line in the
+	 * given file.
+	 * </p>
+	 * <p>
+	 * Usage: <code>exec filename</code>
+	 * </p>
 	 * 
-	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 * @see de.ugoe.cs.util.console.commands.Command#run(java.util.List)
 	 */
 	public void run(List<Object> parameters) {
@@ -39,11 +43,10 @@
 			String[] commands;
 			File f = new File(script);
-			FileInputStream fis = new FileInputStream(f);
-			InputStreamReader reader = new InputStreamReader(fis, "UTF-8");
+			FileReader reader = new FileReader(f);
 			char[] buffer = new char[(int) f.length()];
 			reader.read(buffer);
 			commands = (new String(buffer)).split("\n");
 			for (String command : commands) {
-				Console.traceln(command.trim());
+				Console.println(command);
 				CommandExecuter.getInstance().exec(command);
 			}
@@ -63,5 +66,5 @@
 	@Override
 	public void help() {
-		Console.println("Usage: exec <filename>");
+		Console.println("Usage: exec filename");
 	}
 }
Index: trunk/JavaHelperLib/src/de/ugoe/cs/util/console/defaultcommands/CMDexit.java
===================================================================
--- trunk/JavaHelperLib/src/de/ugoe/cs/util/console/defaultcommands/CMDexit.java	(revision 425)
+++ trunk/JavaHelperLib/src/de/ugoe/cs/util/console/defaultcommands/CMDexit.java	(revision 1)
@@ -8,15 +8,13 @@
 /**
  * <p>
- * Command to terminate an application.
+ * Implements a command to terminate an application.
  * </p>
  * 
  * @author Steffen Herbold
- * @version 1.0
+ *
  */
 public class CMDexit implements Command {
 
-	/*
-	 * (non-Javadoc)
-	 * 
+	/* (non-Javadoc)
 	 * @see databasebuilder.console.commands.Command#help()
 	 */
@@ -25,9 +23,12 @@
 		Console.println("Usage: exit");
 	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	
+	/**
+	 * <p>
+	 * Terminates the programm.
+	 * </p>
+	 * <p>
+	 * Usage: <code>exit</code>
+	 * </p>
 	 */
 	@Override
