Index: FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/Connector.java
===================================================================
--- FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/Connector.java	(revision 2837)
+++ FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/Connector.java	(revision 2847)
@@ -56,4 +56,5 @@
 	 */
 	public final static String KEY_NAME = "name";
+	
 	/**
 	 * This key is to address a file's size in
@@ -122,5 +123,6 @@
 	 * Uploads a new file into the abstract path
 	 * <code>/[type-folder]/[currentFolder]</code>. If there is already a file
-	 * with the same name, the new one has to be renamed.<br/>
+	 * with the same name, the new one has to be renamed by the following
+	 * pattern: <code>basename(count).ext</code><br/>
 	 * FileUpload and QuickUpload will be handled the same way since QuickUpload
 	 * is just a specialization of FileUpload.
Index: FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/ConnectorServlet.java
===================================================================
--- FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/ConnectorServlet.java	(revision 2837)
+++ FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/ConnectorServlet.java	(revision 2847)
@@ -37,6 +37,6 @@
 
 /**
- * TODO Review documentation
- * This is the FCKeditor Connector servlet. It has the following jobs:
+ * TODO Review documentation This is the FCKeditor Connector servlet. It has the
+ * following jobs:
  * <ul>
  * <li>Initialization of the {@link Dispatcher} object.</li>
@@ -56,9 +56,16 @@
  * </ul>
  * <br>
- * Summing up: This workflow guarantees the correct initialization and cleaning
- * of the {@link ThreadLocalData}, - it's essential because of preventing
- * memory-leaks. All requests are dispatched to the {@link Dispatcher}. The
- * {@link Dispatcher} forwards the request to an implementation of the
- * {@link Connector}.
+ * <b>Important</b>: This workflow guarantees the correct initialization and
+ * cleaning of the {@link ThreadLocalData}, - it's essential because of
+ * preventing memory-leaks! <br>
+ * <br>
+ * All requests are dispatched to the {@link Dispatcher}. It's a kind of
+ * 'middleman', which verifies the request parameters before forwarding them to
+ * the corresponding method of an implementation of the {@link Connector}.
+ * Dependent on this verification and the method call the {@link Dispatcher}
+ * initializes {@link GetResponse} or {@link UploadResponse}, which is used to
+ * build the HttpServletResponse in
+ * {@link #doGet(HttpServletRequest, HttpServletResponse)} or
+ * {@link #doPost(HttpServletRequest, HttpServletResponse)}.
  * 
  * @version $Id$
Index: FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/Dispatcher.java
===================================================================
--- FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/Dispatcher.java	(revision 2837)
+++ FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/Dispatcher.java	(revision 2847)
@@ -55,17 +55,18 @@
 
 /**
- * TODO Review documentation
- * This class is called by {@link ConnectorServlet}. It verifies the request
- * parameters and forwards them to the corresponding {@link Connector} methods.
- * If an error has occurred inside these methods, well-defined exceptions from
- * {@link net.fckeditor.connector.exception} will be thrown. These exceptions or
- * the return values of {@link Connector} methods will be transfered to the
- * HttpServletResponse object.
+ * TODO Review documentation This class is called by {@link ConnectorServlet}.
+ * It verifies the request parameters and forwards them to the corresponding
+ * {@link Connector} methods. Dependent on this verification and the method calls
+ * the {@link Dispatcher} initializes {@link GetResponse} or
+ * {@link UploadResponse}. These response objects will be used later in
+ * {@link ConnectorServlet} to build the HttpServletResponse. If an error has
+ * occurred inside {@link Connector} methods, well-defined exceptions from
+ * {@link net.fckeditor.connector.exception} will be thrown. Dependent on these 
+ * exceptions the response objects are initialized.
  * 
  * @version $Id$
  */
 public class Dispatcher {
-	private static final Logger logger = LoggerFactory
-			.getLogger(Dispatcher.class);
+	private static final Logger logger = LoggerFactory.getLogger(Dispatcher.class);
 	private Connector connector = null;
 	
Index: FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/impl/AbstractLocalFileSystemConnector.java
===================================================================
--- FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/impl/AbstractLocalFileSystemConnector.java	(revision 2837)
+++ FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/impl/AbstractLocalFileSystemConnector.java	(revision 2847)
@@ -57,6 +57,5 @@
  * two ready to go subclasses, see above.
  * 
- * @version $Id: AbstracLocalFileSystemConnector.java 2741 2008-11-29 14:06:19Z
- *          mosipov $
+ * @version $Id$
  */
 public abstract class AbstractLocalFileSystemConnector implements Connector {
@@ -64,8 +63,7 @@
 	protected static ServletContext servletContext;
 
-	/*
-	 * (non-Javadoc)
+	/* (non-Javadoc)
 	 * 
-	 * @seenet.fckeditor.connector.Connector#fileUpload(net.fckeditor.handlers.
+	 * @see net.fckeditor.connector.Connector#fileUpload(net.fckeditor.handlers.
 	 * ResourceType, java.lang.String, java.lang.String, java.io.InputStream)
 	 */
@@ -120,5 +118,5 @@
 	 * (non-Javadoc)
 	 * 
-	 * @seenet.fckeditor.connector.Connector#getFiles(net.fckeditor.handlers.
+	 * @see net.fckeditor.connector.Connector#getFiles(net.fckeditor.handlers.
 	 * ResourceType, java.lang.String)
 	 */
@@ -150,5 +148,5 @@
 	 * (non-Javadoc)
 	 * 
-	 * @seenet.fckeditor.connector.Connector#getFolders(net.fckeditor.handlers.
+	 * @see net.fckeditor.connector.Connector#getFolders(net.fckeditor.handlers.
 	 * ResourceType, java.lang.String)
 	 */
Index: FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/impl/ContextConnector.java
===================================================================
--- FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/impl/ContextConnector.java	(revision 2837)
+++ FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/impl/ContextConnector.java	(revision 2847)
@@ -46,13 +46,6 @@
  */
 public class ContextConnector extends AbstractLocalFileSystemConnector {
+	private final Logger logger = LoggerFactory.getLogger(ContextConnector.class);
 
-	private final Logger logger = LoggerFactory
-			.getLogger(ContextConnector.class);
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see net.fckeditor.connector.Connector#init()
-	 */
 	/**
 	 * This method will prepare the connector for further usage, additionally it
@@ -64,7 +57,8 @@
 	 * local filesystem (real path). If it fails, it will emit helpful log
 	 * messages and will throw an exception too.
+	 * 
+	 * @see net.fckeditor.connector.Connector#init()
 	 */
 	public void init(final ServletContext servletContext) throws Exception {
-
 		AbstractLocalFileSystemConnector.servletContext = servletContext;
 		String defaultAbsolutePath = getRealUserFilesAbsolutePath(PropertiesLoader
@@ -72,10 +66,7 @@
 
 		if (defaultAbsolutePath == null) {
-			logger
-					.error("The context root cannot be resolved against the local filesystem");
-			logger
-					.info("Your servlet container/application server does not expand deployed war files");
-			logger
-					.debug("Use another Connector implementation (e.g. LocalConnector) and consult http://www.fckeditor.net/forums/viewtopic.php?f=6&t=11568");
+			logger.error("The context root cannot be resolved against the local filesystem");
+			logger.info("Your servlet container/application server does not expand deployed war files");
+			logger.debug("Use another Connector implementation (e.g. LocalConnector) and consult http://www.fckeditor.net/forums/viewtopic.php?f=6&t=11568");
 			throw new NullPointerException(
 					"The context root cannot be resolved against the local filesystem");
Index: FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/UtilsFile.java
===================================================================
--- FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/UtilsFile.java	(revision 2837)
+++ FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/UtilsFile.java	(revision 2847)
@@ -140,4 +140,14 @@
 	}
 
+	/**
+	 * Ensures 'file' is a unique one. <br>
+	 * If 'file' already exists, it will be renamed by using the following
+	 * pattern: <code>basename(count).ext</code>. For example, if the 'file' is
+	 * named "Test.doc", the names to be used, in order, are: "Test(1).doc",
+	 * "Test(2).doc", Test(3).doc"... and so on.
+	 * 
+	 * @param file
+	 * @return Unique file.
+	 */
 	public static File getUniqueFile(final File file) {
 		if (!file.exists())
@@ -145,10 +155,10 @@
 		
 		File tmpFile = new File(file.getAbsolutePath());
-		File dir = tmpFile.getParentFile();
+		File parentDir = tmpFile.getParentFile();
 		int count = 1;
 		String extension = FilenameUtils.getExtension(tmpFile.getName());
 		String baseName = FilenameUtils.getBaseName(tmpFile.getName());
 		do {
-			tmpFile = new File(dir, baseName + "(" + count++ + ")." + extension);
+			tmpFile = new File(parentDir, baseName + "(" + count++ + ")." + extension);
 		} while (tmpFile.exists());
 		return tmpFile;
