commit d8426ffb6e7d080257461963a7fef18d48203e9c
Author: Miltiadis Vasilakis <mvasilak@gmail.com>
Date:   Wed Feb 29 21:51:58 2012 +0200

    Support multiple accounts. Bug fixes. Improve concurrency.

diff --git a/pithos-apple-common b/pithos-apple-common
index 308855b..097cb83 160000
--- a/pithos-apple-common
+++ b/pithos-apple-common
@@ -1 +1 @@
-Subproject commit 308855b44f430202033eda90f597f6abdae5ea80
+Subproject commit 097cb8319ef7a831c06f6154df3c63b043382ff2
diff --git a/pithos-macos.xcodeproj/project.pbxproj b/pithos-macos.xcodeproj/project.pbxproj
index 6d5ca0e..54d1c44 100644
--- a/pithos-macos.xcodeproj/project.pbxproj
+++ b/pithos-macos.xcodeproj/project.pbxproj
@@ -48,6 +48,7 @@
 		614299A914CEF0E7008D973A /* ASIPithos.m in Sources */ = {isa = PBXBuildFile; fileRef = 614299A814CEF0E7008D973A /* ASIPithos.m */; };
 		61433BC9141BA1CE00CD978D /* HashMapHash.m in Sources */ = {isa = PBXBuildFile; fileRef = 61433BC8141BA1CE00CD978D /* HashMapHash.m */; };
 		614592BC1417CE70002E7A8C /* ASIPithosAccount.m in Sources */ = {isa = PBXBuildFile; fileRef = 614592BB1417CE70002E7A8C /* ASIPithosAccount.m */; };
+		614EEC8414E16EB5009DEFCC /* PithosAccount.m in Sources */ = {isa = PBXBuildFile; fileRef = 614EEC8314E16EB5009DEFCC /* PithosAccount.m */; };
 		6152D08C143200CC00803874 /* PithosSharingAccountsNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 6152D08B143200CC00803874 /* PithosSharingAccountsNode.m */; };
 		6152D092143334CC00803874 /* AllowedToBoolTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 6152D091143334CC00803874 /* AllowedToBoolTransformer.m */; };
 		6152D095143334E000803874 /* SharingAccountBoolTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 6152D094143334E000803874 /* SharingAccountBoolTransformer.m */; };
@@ -165,6 +166,8 @@
 		61433BC8141BA1CE00CD978D /* HashMapHash.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HashMapHash.m; path = "pithos-macos/HashMapHash.m"; sourceTree = "<group>"; };
 		614592BA1417CE70002E7A8C /* ASIPithosAccount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIPithosAccount.h; sourceTree = "<group>"; };
 		614592BB1417CE70002E7A8C /* ASIPithosAccount.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASIPithosAccount.m; sourceTree = "<group>"; };
+		614EEC8214E16EB5009DEFCC /* PithosAccount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PithosAccount.h; sourceTree = "<group>"; };
+		614EEC8314E16EB5009DEFCC /* PithosAccount.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PithosAccount.m; sourceTree = "<group>"; };
 		6152D08A143200CB00803874 /* PithosSharingAccountsNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PithosSharingAccountsNode.h; sourceTree = "<group>"; };
 		6152D08B143200CC00803874 /* PithosSharingAccountsNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PithosSharingAccountsNode.m; sourceTree = "<group>"; };
 		6152D090143334CC00803874 /* AllowedToBoolTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AllowedToBoolTransformer.h; path = "pithos-macos/AllowedToBoolTransformer.h"; sourceTree = "<group>"; };
@@ -283,14 +286,16 @@
 		610DD2FB13E6BB2000ED982F /* pithos-macos */ = {
 			isa = PBXGroup;
 			children = (
+				610DD30713E6BB2000ED982F /* pithos_macosAppDelegate.h */,
+				610DD30813E6BB2000ED982F /* pithos_macosAppDelegate.m */,
+				614EEC8214E16EB5009DEFCC /* PithosAccount.h */,
+				614EEC8314E16EB5009DEFCC /* PithosAccount.m */,
 				61F040E71447218F00A0C788 /* PithosBrowser */,
 				61F040E51447217100A0C788 /* PithosSyncDaemon */,
 				61F040E8144721B200A0C788 /* PithosActivityFacility */,
 				61F1C5DB1444A8CF00C1E6EB /* PithosNodes */,
 				61F1C5DD1444A92B00C1E6EB /* PithosNodeInfoControllers */,
 				610DD2FC13E6BB2000ED982F /* Supporting Files */,
-				610DD30713E6BB2000ED982F /* pithos_macosAppDelegate.h */,
-				610DD30813E6BB2000ED982F /* pithos_macosAppDelegate.m */,
 				610DD30A13E6BB2000ED982F /* MainMenu.xib */,
 				61C24BEA14161EC0007004DC /* PithosUtilities.h */,
 				61C24BEB14161EC3007004DC /* PithosUtilities.m */,
@@ -555,7 +560,7 @@
 		610DD2E813E6BB2000ED982F /* Project object */ = {
 			isa = PBXProject;
 			attributes = {
-				LastUpgradeCheck = 0420;
+				LastUpgradeCheck = 0430;
 				ORGANIZATIONNAME = koomasi;
 			};
 			buildConfigurationList = 610DD2EB13E6BB2000ED982F /* Build configuration list for PBXProject "pithos-macos" */;
@@ -659,6 +664,7 @@
 				6154BF531456EE4900EE353A /* DirPathFileURLTransformer.m in Sources */,
 				613BA8631461520E00FACAA5 /* NonEmptyStringFormatter.m in Sources */,
 				614299A914CEF0E7008D973A /* ASIPithos.m in Sources */,
+				614EEC8414E16EB5009DEFCC /* PithosAccount.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/pithos-macos/LastCompletedSyncTransformer.m b/pithos-macos/LastCompletedSyncTransformer.m
index ecdaf44..8f6b471 100644
--- a/pithos-macos/LastCompletedSyncTransformer.m
+++ b/pithos-macos/LastCompletedSyncTransformer.m
@@ -2,7 +2,7 @@
 //  LastCompletedSyncTransformer.m
 //  pithos-macos
 //
-// Copyright 2011 GRNET S.A. All rights reserved.
+// Copyright 2011-2012 GRNET S.A. All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or
 // without modification, are permitted provided that the following
@@ -49,7 +49,7 @@
 
 - (id)transformedValue:(id)value {
     if (value == nil)
-		return @"Last Sync: -";
+		return @"-";
     
     NSCalendar *calendar = [NSCalendar currentCalendar];
     NSDateComponents *comps = [calendar components:(NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit) fromDate:[NSDate date]];
@@ -59,16 +59,16 @@
     NSTimeInterval timeInterval = [[calendar dateFromComponents:comps] timeIntervalSinceDate:(NSDate *)value];
     if (timeInterval < 86400) {
         // Today
-        return [NSString stringWithFormat:@"Last Sync: Today %@", [NSDateFormatter localizedStringFromDate:(NSDate *)value 
+        return [NSString stringWithFormat:@"Today %@", [NSDateFormatter localizedStringFromDate:(NSDate *)value 
                                                                                                      dateStyle:NSDateFormatterNoStyle 
                                                                                                      timeStyle:NSDateFormatterShortStyle]];
     } else if (timeInterval < 172800) {
         // Yesterday
-        return [NSString stringWithFormat:@"Last Sync: Yesterday %@", [NSDateFormatter localizedStringFromDate:(NSDate *)value 
+        return [NSString stringWithFormat:@"Yesterday %@", [NSDateFormatter localizedStringFromDate:(NSDate *)value 
                                                                                            dateStyle:NSDateFormatterNoStyle 
                                                                                            timeStyle:NSDateFormatterShortStyle]];
     } else {
-        return [NSString stringWithFormat:@"Last Sync: %@", [NSDateFormatter localizedStringFromDate:(NSDate *)value 
+        return [NSString stringWithFormat:@"%@", [NSDateFormatter localizedStringFromDate:(NSDate *)value 
                                                                                            dateStyle:NSDateFormatterShortStyle 
                                                                                            timeStyle:NSDateFormatterShortStyle]];
     }
diff --git a/pithos-macos/PithosAccount.h b/pithos-macos/PithosAccount.h
new file mode 100644
index 0000000..9aae18e
--- /dev/null
+++ b/pithos-macos/PithosAccount.h
@@ -0,0 +1,112 @@
+//
+//  PithosAccount.h
+//  pithos-macos
+//
+// Copyright 2012 GRNET S.A. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
+
+#import <Foundation/Foundation.h>
+@class PithosSyncDaemon;
+@class ASIPithos;
+@class PithosAccountNode;
+
+@interface PithosAccount : NSObject <NSCoding> {
+    NSString *uniqueName;
+    BOOL active;
+    NSString *name;
+    
+    BOOL syncActive;
+    NSString *syncDirectoryPath;
+    NSString *syncContainerName;
+    NSDate *syncLastCompleted;
+    PithosSyncDaemon *syncDaemon;
+        
+    // Base for all necessary URLs, default "https://plus.pithos.grnet.gr"
+    NSString *serverURL;
+    // Appended to serverURL to get storageURLPrefix and authURL, default "v1"
+    // Can be overriden by setting directly storageURLPrefix and authURL
+    NSString *versionResource;
+    // Appended to serverURL to get loginURLPrefix, default "login"
+    // Can be overriden by setting directly loginURLPrefix
+    NSString *loginResource;
+    // Appended to serverURL to get publicURLPrefix, default nil
+    // Can be overriden by setting directly publicURLPrefix
+    NSString *publicResource;
+
+    NSString *authUser;
+    NSString *authToken;
+    NSString *storageURLPrefix;
+    NSString *authURL;
+    NSString *publicURLPrefix;
+    NSString *loginURLPrefix;
+    
+    ASIPithos *pithos;
+    PithosAccountNode *accountNode;
+    
+    BOOL updatePithos;
+    BOOL resetSyncDaemonLocalState;
+}
+
+@property (nonatomic, retain) NSString *uniqueName;
+@property (assign) BOOL active;
+@property (nonatomic, retain) NSString *name;
+
+@property (nonatomic, assign) BOOL syncActive;
+@property (nonatomic, retain) NSString *syncDirectoryPath;
+@property (nonatomic, retain) NSString *syncContainerName;
+@property (nonatomic, retain) NSDate *syncLastCompleted;
+@property (nonatomic, retain) PithosSyncDaemon *syncDaemon;
+
+@property (nonatomic, retain) NSString *serverURL;
+@property (retain) NSString *versionResource;
+@property (retain) NSString *loginResource;
+@property (retain) NSString *publicResource;
+
+@property (nonatomic, retain) NSString *authUser;
+@property (nonatomic, retain) NSString *authToken;
+@property (nonatomic, retain) NSString *storageURLPrefix;
+@property (nonatomic, retain) NSString *authURL;
+@property (nonatomic, retain) NSString *publicURLPrefix;
+@property (nonatomic, retain) NSString *loginURLPrefix;
+
+@property (readonly) ASIPithos *pithos;
+@property (readonly) PithosAccountNode *accountNode;
+
++ (id)pithosAccount;
+
+- (BOOL)urlIsValid:(NSString *)urlString;
+- (void)authenticateWithServerURL:(NSString *)aServerURL authUser:(NSString *)anAuthUser authToken:(NSString *)anAuthToken;
+- (void)loginWithServerURL:(NSString *)aServerURL;
+- (void)updateSyncWithSyncActive:(BOOL)aSyncActive syncDirectoryPath:(NSString *)aSyncDirectoryPath;
+
+@end
diff --git a/pithos-macos/PithosAccount.m b/pithos-macos/PithosAccount.m
new file mode 100644
index 0000000..f97b23f
--- /dev/null
+++ b/pithos-macos/PithosAccount.m
@@ -0,0 +1,473 @@
+//
+//  PithosAccount.m
+//  pithos-macos
+//
+// Copyright 2012 GRNET S.A. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
+
+#import "PithosAccount.h"
+#import "PithosSyncDaemon.h"
+#import "ASIPithos.h"
+#import "PithosAccountNode.h"
+#import "pithos_macosAppDelegate.h"
+
+@interface PithosAccount (Internal)
+- (BOOL)urlIsValid:(NSString *)urlString;
+@end
+
+@implementation PithosAccount
+@synthesize uniqueName, active, name;
+@synthesize syncActive, syncDirectoryPath, syncContainerName, syncLastCompleted, syncDaemon;
+@synthesize serverURL, versionResource, loginResource, publicResource;
+@synthesize authUser, authToken, storageURLPrefix, authURL, loginURLPrefix, publicURLPrefix;
+@synthesize pithos, accountNode;
+
+#pragma mark -
+#pragma mark Object Lifecycle
+
++ (id)pithosAccount {
+    PithosAccount *pithosAccount = [[[self alloc] init] autorelease];
+    pithosAccount.uniqueName = [NSString stringWithFormat:@"pithosAccount-%f", [NSDate timeIntervalSinceReferenceDate]];
+    pithosAccount.versionResource = [NSString stringWithString:@"v1"];
+    pithosAccount.loginResource = [NSString stringWithString:@"login"];
+    return pithosAccount;
+}
+
+- (void)dealloc {
+    [accountNode release];
+    [pithos release];
+    [publicURLPrefix release];
+    [loginURLPrefix release];
+    [authURL release];
+    [storageURLPrefix release];
+    [authToken release];
+    [authUser release];
+    [publicResource release];
+    [loginResource release];
+    [versionResource release];
+    [serverURL release];
+    [syncDaemon release];
+    [syncLastCompleted release];
+    [syncContainerName release];
+    [syncDirectoryPath release];
+    [name release];
+    [uniqueName release];
+    [super dealloc];
+}
+
+- (NSString *)description {
+    return [NSString stringWithFormat:@"uniqueName: %@, active: %d, name: %@, syncActive: %d, syncDirectoryPath: %@, syncContainerName: %@, syncLastCompleted: %@, serverURL: %@, versionResource: %@, loginResource: %@, publicResource: %@, authUser: %@, authToken: %@, storageURLPrefix: %@, authURL: %@, loginURLPrefix: %@, publicURLPrefix: %@", 
+            uniqueName, active, name, syncActive, syncDirectoryPath, syncContainerName, syncLastCompleted, serverURL, versionResource, loginResource, publicResource, authUser, authToken, storageURLPrefix, authURL, loginURLPrefix, publicURLPrefix];
+}
+
+#pragma mark -
+#pragma mark Internal
+
+- (BOOL)urlIsValid:(NSString *)urlString {
+    if (urlString) {
+        NSURL *url = [NSURL URLWithString:urlString];
+        if (url && url.scheme && url.host)
+            return YES;
+    }
+    return NO;
+}
+
+#pragma mark -
+#pragma mark Properties
+
+- (NSString *)name {
+    if (![name length]) {
+        [name release];
+        NSDictionary *pithosAccountsDictionary = [(pithos_macosAppDelegate *)[[NSApplication sharedApplication] delegate] pithosAccountsDictionary];
+        NSString *namePrefix = [NSString stringWithString:@"okeanos"];
+        NSUInteger nameSuffix = 1;
+        name = [NSString stringWithString:@"okeanos"];
+        NSString *documentsDirectoryPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
+        NSFileManager *fileManager = [NSFileManager defaultManager];
+        while ([pithosAccountsDictionary objectForKey:name] || 
+               [fileManager fileExistsAtPath:[documentsDirectoryPath stringByAppendingPathComponent:name]]) {
+            name = [NSString stringWithFormat:@"%@%d", namePrefix, ++nameSuffix];
+        }
+        [name retain];
+    }
+    return name;
+}
+
+- (void)setName:(NSString *)aName {
+    NSMutableDictionary *pithosAccountsDictionary = [(pithos_macosAppDelegate *)[[NSApplication sharedApplication] delegate] pithosAccountsDictionary];
+    if (![self.name isEqualToString:aName] && [aName length] && ![pithosAccountsDictionary objectForKey:aName]) {
+        [pithosAccountsDictionary setObject:self forKey:aName];
+        [pithosAccountsDictionary removeObjectForKey:name];
+        [name release];
+        name = [aName retain];
+    }
+}
+
+- (BOOL)syncActive {
+    if (active)
+        return syncActive;
+    else
+        return NO;
+}
+
+- (void)setSyncActive:(BOOL)aSyncActive {
+    syncActive = aSyncActive;
+    if (syncDaemon && !self.syncActive)
+        [syncDaemon resetDaemon];
+}
+
+- (NSString *)syncDirectoryPath {
+    if (![syncDirectoryPath length]) {
+        [syncDirectoryPath release];
+        syncDirectoryPath = [[[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] 
+                              stringByAppendingPathComponent:self.name] retain];
+    }
+    return syncDirectoryPath;
+}
+
+- (void)setSyncDirectoryPath:(NSString *)aSyncDirectoryPath {
+    if (![self.syncDirectoryPath isEqualToString:aSyncDirectoryPath] && [aSyncDirectoryPath length]) {
+        BOOL isDirectory;
+        if (![[NSFileManager defaultManager] fileExistsAtPath:aSyncDirectoryPath isDirectory:&isDirectory] || isDirectory) {
+            [syncDirectoryPath release];
+            syncDirectoryPath = [aSyncDirectoryPath retain];
+        } else {
+            return;
+        }
+
+        @synchronized(self) {
+            resetSyncDaemonLocalState = YES;
+            [syncLastCompleted release];
+            syncLastCompleted = nil;
+        }
+    }
+}
+
+- (NSString *)syncContainerName {
+    if (![syncContainerName length]) {
+        [syncContainerName release];
+        syncContainerName = [[NSString stringWithString:@"pithos"] retain];
+    }        
+    return syncContainerName;
+}
+
+- (void)setSyncContainerName:(NSString *)aSyncContainerName {
+    if (![self.syncContainerName isEqualToString:aSyncContainerName] && [aSyncContainerName length]) {
+        [syncContainerName release];
+        syncContainerName = [aSyncContainerName retain];
+        
+        @synchronized(self) {
+            resetSyncDaemonLocalState = YES;
+            [syncLastCompleted release];
+            syncLastCompleted = nil;
+        }
+    }
+}
+
+- (NSDate *)syncLastCompleted {
+    if (self.syncDaemon.lastCompletedSync && ![self.syncDaemon.lastCompletedSync isEqualToDate:syncLastCompleted]) {
+        [syncLastCompleted release];
+        syncLastCompleted = [self.syncDaemon.lastCompletedSync copy];
+    }
+    return syncLastCompleted;
+}
+
+- (PithosSyncDaemon *)syncDaemon {
+    @synchronized(self) {
+        if (self.syncActive && !syncDaemon)
+            syncDaemon = [[PithosSyncDaemon alloc] initWithDirectoryPath:self.syncDirectoryPath 
+                                                           pithosAccount:self 
+                                                           containerName:self.syncContainerName 
+                                                         resetLocalState:resetSyncDaemonLocalState];
+        resetSyncDaemonLocalState = NO;
+    }
+    return syncDaemon;
+}
+
+- (NSString *)serverURL {
+    if (![self urlIsValid:serverURL]) {
+        [serverURL release];
+        serverURL = [[NSString stringWithString:@"https://plus.pithos.grnet.gr"] retain];
+    }
+    return serverURL;
+}
+
+- (void)setServerURL:(NSString *)aServerURL {
+    if (![self.serverURL isEqualToString:aServerURL] && [self urlIsValid:aServerURL]) {
+        [serverURL release];
+        serverURL = [aServerURL retain];
+        [storageURLPrefix release];
+        storageURLPrefix = nil;
+        [authURL release];
+        authURL = nil;
+        [publicURLPrefix release];
+        publicURLPrefix = nil;
+        [loginURLPrefix release];
+        loginURLPrefix = nil;
+
+        @synchronized(self) {
+            updatePithos = YES;
+            resetSyncDaemonLocalState = YES;
+            [syncLastCompleted release];
+            syncLastCompleted = nil;
+        }
+    }
+}
+
+- (void)setAuthUser:(NSString *)anAuthUser {
+    if ([anAuthUser length] && ![anAuthUser isEqualToString:authUser]) {
+        [authUser release];
+        authUser = [anAuthUser retain];
+        
+        @synchronized(self) {
+            updatePithos = YES;
+            resetSyncDaemonLocalState = YES;
+            [syncLastCompleted release];
+            syncLastCompleted = nil;
+
+        }
+    }
+}
+
+- (void)setAuthToken:(NSString *)anAuthToken {
+    if ([anAuthToken length] && ![anAuthToken isEqualToString:authToken]) {
+        [authToken release];
+        authToken = [anAuthToken retain];
+        
+        @synchronized(self) {
+            updatePithos = YES;
+        }
+    }
+}
+
+- (NSString *)storageURLPrefix {
+    if (![self urlIsValid:storageURLPrefix]) {
+        [storageURLPrefix release];
+        if (versionResource)
+            storageURLPrefix = [[self.serverURL stringByAppendingFormat:@"/%@", versionResource] retain];
+        else
+            storageURLPrefix = [self.serverURL copy];
+    }
+    return storageURLPrefix;
+}
+
+- (void)setStorageURLPrefix:(NSString *)aStorageURLPrefix {
+    if (![self.storageURLPrefix isEqualToString:aStorageURLPrefix] && [self urlIsValid:aStorageURLPrefix]) {
+        [storageURLPrefix release];
+        storageURLPrefix = [aStorageURLPrefix retain];
+    }
+}
+
+- (NSString *)authURL {
+    if (![self urlIsValid:authURL]) {
+        [authURL release];
+        if (versionResource)
+            authURL = [[self.serverURL stringByAppendingFormat:@"/%@", versionResource] retain];
+        else
+            authURL = [self.serverURL copy];
+    }
+    return authURL;
+}
+
+- (void)setAuthURL:(NSString *)anAuthURL {
+    if (![self.authURL isEqualToString:anAuthURL] && [self urlIsValid:anAuthURL]) {
+        [authURL release];
+        authURL = [anAuthURL retain];
+    }
+}
+
+- (NSString *)publicURLPrefix {
+    if (![self urlIsValid:publicURLPrefix]) {
+        [publicURLPrefix release];
+        if (publicResource)
+            publicURLPrefix = [[self.serverURL stringByAppendingFormat:@"/%@", publicResource] retain];
+        else
+            publicURLPrefix = [self.serverURL copy];
+    }
+    return publicURLPrefix;
+}
+
+- (void)setPublicURLPrefix:(NSString *)aPublicURLPrefix {
+    if (![self.publicURLPrefix isEqualToString:aPublicURLPrefix] && [self urlIsValid:aPublicURLPrefix]) {
+        [publicURLPrefix release];
+        publicURLPrefix = [aPublicURLPrefix retain];
+    }
+}
+
+- (NSString *)loginURLPrefix {
+    if (![self urlIsValid:loginURLPrefix]) {
+        [loginURLPrefix release];
+        if (loginResource)
+            loginURLPrefix = [[self.serverURL stringByAppendingFormat:@"/%@", loginResource] retain];
+        else
+            loginURLPrefix = [self.serverURL copy];
+    }
+    return loginURLPrefix;
+}
+
+- (void)setLoginURLPrefix:(NSString *)aLoginURLPrefix {
+    if (![self.loginURLPrefix isEqualToString:aLoginURLPrefix] && [self urlIsValid:aLoginURLPrefix]) {
+        [loginURLPrefix release];
+        loginURLPrefix = [aLoginURLPrefix retain];
+    }
+}
+
+- (ASIPithos *)pithos {
+    @synchronized(self) {
+        if (!pithos || updatePithos) {
+            [pithos release];
+            pithos = [[ASIPithos pithos] retain];
+            pithos.authUser = authUser;
+            pithos.authToken = authToken;
+            pithos.storageURLPrefix = self.storageURLPrefix;
+            pithos.authURL = self.authURL;
+            pithos.publicURLPrefix = self.publicURLPrefix;
+
+            if (accountNode && ![accountNode.pithos isEqualTo:pithos]) {
+                accountNode.pithos = pithos;
+                if (active)
+                    [accountNode refreshInfo];
+            }
+            
+            updatePithos = NO;
+        }
+    }
+    return pithos;
+}
+
+- (PithosAccountNode *)accountNode {
+    if (!accountNode) {
+        accountNode = [[PithosAccountNode alloc] initWithPithos:self.pithos];
+    }
+    return accountNode;
+}
+
+#pragma mark -
+#pragma mark Actions
+
+- (void)authenticateWithServerURL:(NSString *)aServerURL authUser:(NSString *)anAuthUser authToken:(NSString *)anAuthToken {
+    self.serverURL = aServerURL;
+    self.authUser = anAuthUser;
+    self.authToken = anAuthToken;
+    NSLog(@"Account: %@\nauthentication", self);
+    if (![authUser length] || ![authToken length]) {
+        self.active = NO;
+        self.syncActive = NO;
+        // XXX Show preferences with self as the selected account?
+    } else  {
+        self.active = YES;
+        if (syncDaemon) {
+            self.syncDaemon.pithos = self.pithos;
+            if (self.syncActive)
+                [self.syncDaemon startDaemon];
+        }
+    }
+}
+
+- (void)loginWithServerURL:(NSString *)aServerURL {
+    self.serverURL = aServerURL;
+    NSProcessInfo *processInfo = [NSProcessInfo processInfo];
+    NSString *loginURL = [NSString stringWithFormat:@"%@?next=pithos://%@_%d/%@", 
+                          self.loginURLPrefix, [processInfo processName], [processInfo processIdentifier], self.name];
+    NSLog(@"Account: %@\nloginURL: %@", self, loginURL);
+    [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:loginURL]];
+}
+
+- (void)updateSyncWithSyncActive:(BOOL)aSyncActive syncDirectoryPath:(NSString *)aSyncDirectoryPath {
+    self.syncDirectoryPath = aSyncDirectoryPath;
+    self.syncActive = aSyncActive;
+    if (syncDaemon) {
+        self.syncDaemon.directoryPath = self.syncDirectoryPath;
+        if (self.syncActive)
+            [self.syncDaemon startDaemon];
+    }    
+}
+
+#pragma mark -
+#pragma mark NSCoding
+
+- (id)initWithCoder:(NSCoder *)decoder {
+    if ((self = [super init])) {
+        self.uniqueName = [decoder decodeObjectForKey:@"uniqueName"];
+        self.active = [decoder decodeBoolForKey:@"active"];
+        name = [[decoder decodeObjectForKey:@"name"] retain];
+
+        self.syncActive = [decoder decodeBoolForKey:@"syncActive"];
+        self.syncDirectoryPath = [decoder decodeObjectForKey:@"syncDirectoryPath"];
+        self.syncContainerName = [decoder decodeObjectForKey:@"syncContainerName"];
+        self.syncLastCompleted = [decoder decodeObjectForKey:@"syncLastCompleted"];
+        
+        self.serverURL = [decoder decodeObjectForKey:@"serverURL"];
+        self.versionResource = [decoder decodeObjectForKey:@"versionResource"];
+        self.loginResource = [decoder decodeObjectForKey:@"loginResource"];
+        self.publicResource = [decoder decodeObjectForKey:@"publicResource"];
+        
+        self.authUser = [decoder decodeObjectForKey:@"authUser"];
+        self.authToken = [decoder decodeObjectForKey:@"authToken"];
+        self.storageURLPrefix = [decoder decodeObjectForKey:@"storageURLPrefix"];
+        self.authURL = [decoder decodeObjectForKey:@"authURL"];
+        self.publicURLPrefix = [decoder decodeObjectForKey:@"publicURLPrefix"];
+        self.loginURLPrefix = [decoder decodeObjectForKey:@"loginURLPrefix"];
+        
+        if (![authUser length] || ![authToken length] || ![self.storageURLPrefix length])
+            self.active = NO;
+        
+        resetSyncDaemonLocalState = NO;
+    }
+    return self;
+}
+
+- (void)encodeWithCoder:(NSCoder *)encoder {
+    [encoder encodeObject:uniqueName forKey:@"uniqueName"];
+    [encoder encodeBool:active forKey:@"active"];
+    [encoder encodeObject:name forKey:@"name"];
+    
+    [encoder encodeBool:syncActive forKey:@"syncActive"];
+    [encoder encodeObject:syncDirectoryPath forKey:@"syncDirectoryPath"];
+    [encoder encodeObject:syncContainerName forKey:@"syncContainerName"];
+    [encoder encodeObject:self.syncLastCompleted forKey:@"syncLastCompleted"];
+
+    [encoder encodeObject:serverURL forKey:@"serverURL"];
+    [encoder encodeObject:versionResource forKey:@"versionResource"];
+    [encoder encodeObject:publicResource forKey:@"publicResource"];
+    [encoder encodeObject:loginResource forKey:@"loginResource"];
+    
+    [encoder encodeObject:authUser forKey:@"authUser"];
+    [encoder encodeObject:authToken forKey:@"authToken"];
+    [encoder encodeObject:storageURLPrefix forKey:@"storageURLPrefix"];
+    [encoder encodeObject:authURL forKey:@"authURL"];
+    [encoder encodeObject:publicURLPrefix forKey:@"publicURLPrefix"];
+    [encoder encodeObject:loginURLPrefix forKey:@"loginURLPrefix"];
+}
+
+@end
diff --git a/pithos-macos/PithosAccountNode.m b/pithos-macos/PithosAccountNode.m
index 5a171b7..7f581af 100644
--- a/pithos-macos/PithosAccountNode.m
+++ b/pithos-macos/PithosAccountNode.m
@@ -81,6 +81,15 @@ static NSImage *sharedIcon = nil;
 #pragma mark -
 #pragma mark Properties
 
+- (void)setPithos:(ASIPithos *)aPithos {
+    if (aPithos && ![aPithos isEqualTo:pithos]) {
+        [pithos release];
+        pithos = [aPithos retain];
+        [url release];
+        url = nil;
+    }
+}
+
 - (NSString *)url {
     if (url == nil)
         url = [[NSString alloc] initWithFormat:@"%@%@", 
@@ -298,17 +307,39 @@ static NSImage *sharedIcon = nil;
 
 - (void)accountMetadataRequestFailed:(ASIPithosAccountRequest *)request {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    if ([request isEqualTo:applyMetadataAccountRequest]) {
-        [PithosUtilities httpRequestErrorAlertWithRequest:applyMetadataAccountRequest];
-        @synchronized(self) {
-            [applyMetadataAccountRequest release];
-            applyMetadataAccountRequest = nil;
+    NSUInteger retries = [[request.userInfo objectForKey:@"retries"] unsignedIntegerValue];
+    if (retries > 0) {
+        ASIPithosAccountRequest *newRequest = (ASIPithosAccountRequest *)[PithosUtilities copyRequest:request];
+        [(NSMutableDictionary *)(newRequest.userInfo)setObject:[NSNumber numberWithUnsignedInteger:(--retries)] forKey:@"retries"];
+        if ([request isEqualTo:applyMetadataAccountRequest]) {
+            @synchronized(self) {
+                [applyMetadataAccountRequest release];
+                applyMetadataAccountRequest = newRequest;
+            }
+        } else if ([request isEqualTo:refreshMetadataAccountRequest]) {
+            @synchronized(self) {
+                [refreshMetadataAccountRequest release];
+                refreshMetadataAccountRequest = newRequest;
+            }
         }
-    } else if ([request isEqualTo:refreshMetadataAccountRequest]) {
-        [PithosUtilities httpRequestErrorAlertWithRequest:refreshMetadataAccountRequest];
-        @synchronized(self) {
-            [refreshMetadataAccountRequest release];
-            refreshMetadataAccountRequest = nil;
+        [[PithosUtilities prepareRequest:newRequest priority:[[newRequest.userInfo objectForKey:@"priority"] integerValue]] startAsynchronous];
+    } else {
+        if ([request isEqualTo:applyMetadataAccountRequest]) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [PithosUtilities httpRequestErrorAlertWithRequest:applyMetadataAccountRequest];
+            });
+            @synchronized(self) {
+                [applyMetadataAccountRequest release];
+                applyMetadataAccountRequest = nil;
+            }
+        } else if ([request isEqualTo:refreshMetadataAccountRequest]) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [PithosUtilities httpRequestErrorAlertWithRequest:refreshMetadataAccountRequest];
+            });
+            @synchronized(self) {
+                [refreshMetadataAccountRequest release];
+                refreshMetadataAccountRequest = nil;
+            }
         }
     }
     [pool drain];
diff --git a/pithos-macos/PithosActivity.h b/pithos-macos/PithosActivity.h
index 6569d69..54b49ef 100644
--- a/pithos-macos/PithosActivity.h
+++ b/pithos-macos/PithosActivity.h
@@ -36,6 +36,7 @@
 // or implied, of GRNET S.A.
 
 #import <Foundation/Foundation.h>
+@class PithosAccount;
 
 typedef enum  {
     PithosActivityUpload, 
@@ -52,13 +53,15 @@ typedef enum  {
     NSString *message;
     NSUInteger totalBytes;
     NSUInteger currentBytes;
+    PithosAccount *pithosAccount;
 }
 
-- (id)initWithType:(PithosActivityType)aType;
+- (id)initWithType:(PithosActivityType)aType pithosAccount:(PithosAccount *)aPithosAccount;
 
 @property (nonatomic, assign) PithosActivityType type;
 @property (nonatomic, copy) NSString *message;
 @property (nonatomic, assign) NSUInteger totalBytes;
 @property (nonatomic, assign) NSUInteger currentBytes;
+@property (nonatomic, assign) PithosAccount *pithosAccount;
 
 @end
diff --git a/pithos-macos/PithosActivity.m b/pithos-macos/PithosActivity.m
index 327a106..1b4c16b 100644
--- a/pithos-macos/PithosActivity.m
+++ b/pithos-macos/PithosActivity.m
@@ -36,18 +36,20 @@
 // or implied, of GRNET S.A.
 
 #import "PithosActivity.h"
+#import "PithosAccount.h"
 
 @implementation PithosActivity
-@synthesize type, message, totalBytes, currentBytes;
+@synthesize type, message, totalBytes, currentBytes, pithosAccount;
 
 #pragma mark -
 #pragma mark Object Lifecycle
 
-- (id)initWithType:(PithosActivityType)aType {
+- (id)initWithType:(PithosActivityType)aType pithosAccount:(PithosAccount *)aPithosAccount {
     if ((self = [super init])) {
         type = aType;
         totalBytes = 0;
         currentBytes = 0;
+        pithosAccount = aPithosAccount;
     }
     return self;
 }
@@ -58,8 +60,12 @@
 }
 
 - (NSString *)description {
-    return [NSString stringWithFormat:@"type: %lu, message: %@, totalBytes: %lu, currentBytes: %lu", 
-            type, message, totalBytes, currentBytes];
+    if (pithosAccount)
+        return [NSString stringWithFormat:@"type: %lu, message: %@, totalBytes: %lu, currentBytes: %lu, pithosAccount: %@", 
+                type, message, totalBytes, currentBytes, pithosAccount.name];
+    else
+        return [NSString stringWithFormat:@"type: %lu, message: %@, totalBytes: %lu, currentBytes: %lu", 
+                type, message, totalBytes, currentBytes];
 }
 
 @end
diff --git a/pithos-macos/PithosActivityFacility.h b/pithos-macos/PithosActivityFacility.h
index 912f246..fd0cd60 100644
--- a/pithos-macos/PithosActivityFacility.h
+++ b/pithos-macos/PithosActivityFacility.h
@@ -2,7 +2,7 @@
 //  PithosActivityFacility.h
 //  pithos-macos
 //
-// Copyright 2011 GRNET S.A. All rights reserved.
+// Copyright 2011-2012 GRNET S.A. All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or
 // without modification, are permitted provided that the following
@@ -37,6 +37,7 @@
 
 #import <Foundation/Foundation.h>
 #import "PithosActivity.h"
+@class PithosAccount;
 
 @protocol PithosActivityFacilityDelegate <NSObject>
 @required
@@ -62,13 +63,21 @@
 + (id)defaultPithosActivityFacility;
 
 - (void)reset;
+
 - (PithosActivity *)startActivityWithType:(PithosActivityType)type 
                                   message:(NSString *)message 
                                totalBytes:(NSUInteger)totalBytes 
-                             currentBytes:(NSUInteger)currentBytes;
+                             currentBytes:(NSUInteger)currentBytes 
+                            pithosAccount:(PithosAccount *)pithosAccount;
 - (PithosActivity *)startActivityWithType:(PithosActivityType)type 
-                                  message:(NSString *)message;
+                                  message:(NSString *)message 
+                               totalBytes:(NSUInteger)totalBytes 
+                             currentBytes:(NSUInteger)currentBytes;
+- (PithosActivity *)startActivityWithType:(PithosActivityType)type message:(NSString *)message pithosAccount:(PithosAccount *)pithosAccount;
+- (PithosActivity *)startActivityWithType:(PithosActivityType)type message:(NSString *)message;
+- (PithosActivity *)startAndEndActivityWithType:(PithosActivityType)type message:(NSString *)message pithosAccount:(PithosAccount *)pithosAccount;
 - (PithosActivity *)startAndEndActivityWithType:(PithosActivityType)type message:(NSString *)message;
+
 - (void)updateActivity:(PithosActivity *)activity 
            withMessage:(NSString *)message 
             totalBytes:(NSUInteger)totalBytes 
diff --git a/pithos-macos/PithosActivityFacility.m b/pithos-macos/PithosActivityFacility.m
index 7078b21..92e2fa3 100644
--- a/pithos-macos/PithosActivityFacility.m
+++ b/pithos-macos/PithosActivityFacility.m
@@ -2,7 +2,7 @@
 //  PithosActivityFacility.m
 //  pithos-macos
 //
-// Copyright 2011 GRNET S.A. All rights reserved.
+// Copyright 2011-2012 GRNET S.A. All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or
 // without modification, are permitted provided that the following
@@ -36,6 +36,7 @@
 // or implied, of GRNET S.A.
 
 #import "PithosActivityFacility.h"
+#import "PithosAccount.h"
 
 static PithosActivityFacility *defaultPithosActivityFacility = nil;
 
@@ -172,8 +173,12 @@ static PithosActivityFacility *defaultPithosActivityFacility = nil;
             }
             pickedRunning = YES;
         }
-        if (activity && activity.message)
-            [info setObject:activity.message forKey:@"message"];
+        if (activity && activity.message) {
+            if (activity.pithosAccount)
+                [info setObject:[NSString stringWithFormat:@"[%@] %@", activity.pithosAccount.name, activity.message] forKey:@"message"];
+            else
+                [info setObject:activity.message forKey:@"message"];
+        }
         [info setObject:[NSNumber numberWithUnsignedInteger:[runningActivities count]] forKey:@"runningActivitiesCount"];
         [info setObject:[NSNumber numberWithUnsignedInteger:[endingActivities count]] forKey:@"endingActivitiesCount"];
         [info setObject:[NSNumber numberWithUnsignedInteger:totalUploadBytes] forKey:@"totalUploadBytes"];
@@ -193,8 +198,9 @@ static PithosActivityFacility *defaultPithosActivityFacility = nil;
 - (PithosActivity *)startActivityWithType:(PithosActivityType)type 
                                   message:(NSString *)message 
                                totalBytes:(NSUInteger)totalBytes 
-                               currentBytes:(NSUInteger)currentBytes {
-    PithosActivity *activity = [[[PithosActivity alloc] initWithType:type] autorelease];
+                             currentBytes:(NSUInteger)currentBytes 
+                            pithosAccount:(PithosAccount *)pithosAccount {
+    PithosActivity *activity = [[[PithosActivity alloc] initWithType:type pithosAccount:pithosAccount] autorelease];
     activity.message = message;
     activity.totalBytes = totalBytes;
     activity.currentBytes = currentBytes;
@@ -226,12 +232,27 @@ static PithosActivityFacility *defaultPithosActivityFacility = nil;
 }
 
 - (PithosActivity *)startActivityWithType:(PithosActivityType)type 
+                                  message:(NSString *)message 
+                               totalBytes:(NSUInteger)totalBytes 
+                             currentBytes:(NSUInteger)currentBytes {
+    return [self startActivityWithType:type message:message totalBytes:totalBytes currentBytes:currentBytes pithosAccount:nil];
+}
+
+- (PithosActivity *)startActivityWithType:(PithosActivityType)type 
+                                  message:(NSString *)message 
+                            pithosAccount:(PithosAccount *)pithosAccount {
+    return [self startActivityWithType:type message:message totalBytes:0 currentBytes:0 pithosAccount:pithosAccount];
+}
+
+- (PithosActivity *)startActivityWithType:(PithosActivityType)type 
                                   message:(NSString *)message {
-    return [self startActivityWithType:type message:message totalBytes:0 currentBytes:0];
+    return [self startActivityWithType:type message:message pithosAccount:nil];
 }
 
-- (PithosActivity *)startAndEndActivityWithType:(PithosActivityType)type message:(NSString *)message {
-    PithosActivity *activity = [[[PithosActivity alloc] initWithType:type] autorelease];
+- (PithosActivity *)startAndEndActivityWithType:(PithosActivityType)type 
+                                        message:(NSString *)message 
+                                  pithosAccount:(PithosAccount *)pithosAccount {
+    PithosActivity *activity = [[[PithosActivity alloc] initWithType:type pithosAccount:pithosAccount] autorelease];
     activity.message = message;
     activity.totalBytes = 0;
     activity.currentBytes = 0;
@@ -243,6 +264,10 @@ static PithosActivityFacility *defaultPithosActivityFacility = nil;
     return activity;
 }
 
+- (PithosActivity *)startAndEndActivityWithType:(PithosActivityType)type message:(NSString *)message {
+    return [self startAndEndActivityWithType:type message:message pithosAccount:nil];
+}
+
 - (void)updateActivity:(PithosActivity *)activity 
            withMessage:(NSString *)message 
             totalBytes:(NSUInteger)totalBytes 
diff --git a/pithos-macos/PithosBrowserController.h b/pithos-macos/PithosBrowserController.h
index eef7575..145eb52 100644
--- a/pithos-macos/PithosBrowserController.h
+++ b/pithos-macos/PithosBrowserController.h
@@ -47,6 +47,7 @@
 
 @interface PithosBrowserController : NSWindowController <NSBrowserDelegate, NSSplitViewDelegate, NSOutlineViewDelegate, NSOutlineViewDataSource, NSMenuDelegate, PithosActivityFacilityDelegate> {
     BOOL browserInitialized;
+    BOOL browserActive;
     
     ASIPithos *pithos;
     
@@ -87,11 +88,16 @@
     ASINetworkQueue *deleteNetworkQueue;
     ASINetworkQueue *uploadNetworkQueue;
     ASINetworkQueue *downloadNetworkQueue;
-    dispatch_queue_t moveQueue;
-    dispatch_queue_t copyQueue;
-    dispatch_queue_t deleteQueue;
-    dispatch_queue_t uploadQueue;
-    dispatch_queue_t downloadQueue;
+    NSOperationQueue *moveQueue;
+    NSOperationQueue *copyQueue;
+    NSOperationQueue *deleteQueue;
+    NSOperationQueue *uploadQueue;
+    NSOperationQueue *downloadQueue;
+    NSOperationQueue *moveCallbackQueue;
+    NSOperationQueue *copyCallbackQueue;
+    NSOperationQueue *deleteCallbackQueue;
+    NSOperationQueue *uploadCallbackQueue;
+    NSOperationQueue *downloadCallbackQueue;
 }
 
 @property (nonatomic, retain) ASIPithos *pithos;
@@ -119,5 +125,8 @@
 
 - (IBAction)forceRefresh:(id)sender;
 - (IBAction)refresh:(id)sender;
+- (void)resetBrowser;
+- (void)startBrowser;
+- (BOOL)operationsPending;
 
 @end
diff --git a/pithos-macos/PithosBrowserController.m b/pithos-macos/PithosBrowserController.m
index b976f87..0bcb45e 100644
--- a/pithos-macos/PithosBrowserController.m
+++ b/pithos-macos/PithosBrowserController.m
@@ -120,39 +120,12 @@
     return [super initWithWindowNibName:@"PithosBrowserController"];
 }
 
-- (void)dealloc {
-    [[NSNotificationCenter defaultCenter] removeObserver:self];
-    dispatch_release(moveQueue);
-    dispatch_release(copyQueue);
-    dispatch_release(deleteQueue);
-    dispatch_release(uploadQueue);
-    dispatch_release(downloadQueue);
-    [moveNetworkQueue cancelAllOperations];
-    [moveNetworkQueue release];
-    [copyNetworkQueue cancelAllOperations];
-    [copyNetworkQueue release];
-    [deleteNetworkQueue cancelAllOperations];
-    [deleteNetworkQueue release];
-    [uploadNetworkQueue cancelAllOperations];
-    [uploadNetworkQueue release];
-    [downloadNetworkQueue cancelAllOperations];
-    [downloadNetworkQueue release];
-    [refreshTimer invalidate];
-    [refreshTimer release];
-    [clipboardParentNode release];
-    [clipboardNodes release];
-    [draggedParentNode release];
-    [draggedNodes release];
-    [sharedPreviewController release];
-    [othersSharedNode release];
-    [mySharedNode release];
-    [sharedNode release];
-    [containersNodeChildren release];
-    [containersNode release];
-    [accountNode release];
-    [rootNode release];
-    [pithos release];
-    [super dealloc];
+- (void)windowDidLoad {
+    [super windowDidLoad];
+    if (browser && !browserInitialized) {
+        browserInitialized = YES;
+        [self initBrowser];
+    }
 }
 
 - (void)initBrowser {
@@ -172,27 +145,63 @@
     
     moveNetworkQueue = [[ASINetworkQueue alloc] init];
     moveNetworkQueue.shouldCancelAllRequestsOnFailure = NO;
-    [moveNetworkQueue go];
+//    moveNetworkQueue.maxConcurrentOperationCount = 1;
     copyNetworkQueue = [[ASINetworkQueue alloc] init];
     copyNetworkQueue.shouldCancelAllRequestsOnFailure = NO;
-    [copyNetworkQueue go];
+//    copyNetworkQueue.maxConcurrentOperationCount = 1;
     deleteNetworkQueue = [[ASINetworkQueue alloc] init];
     deleteNetworkQueue.shouldCancelAllRequestsOnFailure = NO;
-    [deleteNetworkQueue go];
+//    deleteNetworkQueue.maxConcurrentOperationCount = 1;
     uploadNetworkQueue = [[ASINetworkQueue alloc] init];
     uploadNetworkQueue.showAccurateProgress = YES;
     uploadNetworkQueue.shouldCancelAllRequestsOnFailure = NO;
-    [uploadNetworkQueue go];
+//    uploadNetworkQueue.maxConcurrentOperationCount = 1;
     downloadNetworkQueue = [[ASINetworkQueue alloc] init];
     downloadNetworkQueue.showAccurateProgress = YES;
     downloadNetworkQueue.shouldCancelAllRequestsOnFailure = NO;
-    [downloadNetworkQueue go];
+//    downloadNetworkQueue.maxConcurrentOperationCount = 1;
+    
+    moveQueue = [[NSOperationQueue alloc] init];
+    [moveQueue setSuspended:YES];
+    moveQueue.name = @"gr.grnet.pithos.MoveQueue";
+//    moveQueue.maxConcurrentOperationCount = 1;
+    copyQueue = [[NSOperationQueue alloc] init];
+    [copyQueue setSuspended:YES];
+    copyQueue.name = @"gr.grnet.pithos.CopyQueue";
+//    copyQueue.maxConcurrentOperationCount = 1;
+    deleteQueue = [[NSOperationQueue alloc] init];
+    [deleteQueue setSuspended:YES];
+    deleteQueue.name = @"gr.grnet.pithos.DeleteQueue";
+//    deleteQueue.maxConcurrentOperationCount = 1;
+    uploadQueue = [[NSOperationQueue alloc] init];
+    [uploadQueue setSuspended:YES];
+    uploadQueue.name = @"gr.grnet.pithos.UploadQueue";
+//    uploadQueue.maxConcurrentOperationCount = 1;
+    downloadQueue = [[NSOperationQueue alloc] init];
+    [downloadQueue setSuspended:YES];
+    downloadQueue.name = @"gr.grnet.pithos.DownloadQueue";
+//    downloadQueue.maxConcurrentOperationCount = 1;
     
-    moveQueue = dispatch_queue_create("gr.grnet.pithos.MoveQueue", NULL);
-    copyQueue = dispatch_queue_create("gr.grnet.pithos.CopyQueue", NULL);
-    deleteQueue = dispatch_queue_create("gr.grnet.pithos.DeleteQueue", NULL);
-    uploadQueue = dispatch_queue_create("gr.grnet.pithos.UploadQueue", NULL);
-    downloadQueue = dispatch_queue_create("gr.grnet.pithos.DownloadQueue", NULL);
+    moveCallbackQueue = [[NSOperationQueue alloc] init];
+    [moveCallbackQueue setSuspended:YES];
+    moveCallbackQueue.name = @"gr.grnet.pithos.MoveCallbackQueue";
+//    moveCallbackQueue.maxConcurrentOperationCount = 1;
+    copyCallbackQueue = [[NSOperationQueue alloc] init];
+    [copyCallbackQueue setSuspended:YES];
+    copyCallbackQueue.name = @"gr.grnet.pithos.CopyCallbackQueue";
+//    copyCallbackQueue.maxConcurrentOperationCount = 1;
+    deleteCallbackQueue = [[NSOperationQueue alloc] init];
+    [deleteCallbackQueue setSuspended:YES];
+    deleteCallbackQueue.name = @"gr.grnet.pithos.DeleteCallbackQueue";
+//    deleteCallbackQueue.maxConcurrentOperationCount = 1;
+    uploadCallbackQueue = [[NSOperationQueue alloc] init];
+    [uploadCallbackQueue setSuspended:YES];
+    uploadCallbackQueue.name = @"gr.grnet.pithos.UploadCallbackQueue";
+//    uploadCallbackQueue.maxConcurrentOperationCount = 1;
+    downloadCallbackQueue = [[NSOperationQueue alloc] init];
+    [downloadCallbackQueue setSuspended:YES];
+    downloadCallbackQueue.name = @"gr.grnet.pithos.DownloadCallbackQueue";
+//    downloadCallbackQueue.maxConcurrentOperationCount = 1;
     
     [activityProgressIndicator setUsesThreadedAnimation:YES];
     [activityProgressIndicator setMinValue:0.0];
@@ -247,59 +256,182 @@
 }
 
 - (void)resetBrowser {
+    @synchronized(self) {
+        if (!browserActive)
+            return;
+    }
+
     [refreshTimer invalidate];
     [refreshTimer release];
     
-    [moveNetworkQueue cancelAllOperations];
-    [copyNetworkQueue cancelAllOperations];
-    [deleteNetworkQueue cancelAllOperations];
-    [uploadNetworkQueue cancelAllOperations];
-    [downloadNetworkQueue cancelAllOperations];
+    [moveNetworkQueue reset];
+    [copyNetworkQueue reset];
+    [deleteNetworkQueue reset];
+    [uploadNetworkQueue reset];
+    [downloadNetworkQueue reset];
     
+    [moveQueue cancelAllOperations];
+    [moveQueue setSuspended:YES];
+    [copyQueue cancelAllOperations];
+    [copyQueue setSuspended:YES];
+    [deleteQueue cancelAllOperations];
+    [deleteQueue setSuspended:YES];
+    [uploadQueue cancelAllOperations];
+    [uploadQueue setSuspended:YES];
+    [downloadQueue cancelAllOperations];
+    [downloadQueue setSuspended:YES];
+
+    [moveCallbackQueue cancelAllOperations];
+    [moveCallbackQueue setSuspended:YES];
+    [copyCallbackQueue cancelAllOperations];
+    [copyCallbackQueue setSuspended:YES];
+    [deleteCallbackQueue cancelAllOperations];
+    [deleteCallbackQueue setSuspended:YES];
+    [uploadCallbackQueue cancelAllOperations];
+    [uploadCallbackQueue setSuspended:YES];
+    [downloadCallbackQueue cancelAllOperations];
+    [downloadCallbackQueue setSuspended:YES];
+
     rootNode = nil;
     [browser loadColumnZero];
     [containersNodeChildren removeAllObjects];
     [outlineView reloadData];
-	// Expand the folder outline view
+    // Expand the folder outline view
     [outlineView expandItem:nil expandChildren:YES];
-	[outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:1] byExtendingSelection:NO];
+    [outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:1] byExtendingSelection:NO];
     
     activityFacility.delegate = nil;
     [activityProgressIndicator setDoubleValue:1.0];
     [activityProgressIndicator stopAnimation:self];
+    
+    @synchronized(self) {
+        browserActive = NO;
+    }
 }
 
 - (void)startBrowser {
+    @synchronized(self) {
+        if (browserActive)
+            return;
+    }
+    
+    // In the improbable case of leftover operations
+    [moveNetworkQueue reset];
+    [copyNetworkQueue reset];
+    [deleteNetworkQueue reset];
+    [uploadNetworkQueue reset];
+    [downloadNetworkQueue reset];
+    [moveQueue cancelAllOperations];
+    [copyQueue cancelAllOperations];
+    [deleteQueue cancelAllOperations];
+    [uploadQueue cancelAllOperations];
+    [downloadQueue cancelAllOperations];
+    [moveCallbackQueue cancelAllOperations];
+    [copyCallbackQueue cancelAllOperations];
+    [deleteCallbackQueue cancelAllOperations];
+    [uploadCallbackQueue cancelAllOperations];
+    [downloadCallbackQueue cancelAllOperations];
+
+    [moveNetworkQueue go];
+    [copyNetworkQueue go];
+    [deleteNetworkQueue go];
+    [uploadNetworkQueue go];
+    [downloadNetworkQueue go];
+    [moveQueue setSuspended:NO];
+    [copyQueue setSuspended:NO];
+    [deleteQueue setSuspended:NO];
+    [uploadQueue setSuspended:NO];
+    [downloadQueue setSuspended:NO];
+    [moveCallbackQueue setSuspended:NO];
+    [copyCallbackQueue setSuspended:NO];
+    [deleteCallbackQueue setSuspended:NO];
+    [uploadCallbackQueue setSuspended:NO];
+    [downloadCallbackQueue setSuspended:NO];
+
     accountNode.pithos = pithos;
-    [accountNode refresh];
+    [accountNode forceRefresh];
     mySharedNode.pithos = pithos;
-    [mySharedNode refresh];
+    [mySharedNode forceRefresh];
     othersSharedNode.pithos = pithos;
-    [othersSharedNode refresh];
-    
-    [activityFacility reset];
+    [othersSharedNode forceRefresh];
+            
+//    [activityFacility reset];
     activityFacility.delegate = self;
-    
-    refreshTimer = [[NSTimer scheduledTimerWithTimeInterval:30 target:self selector:@selector(forceRefresh:) userInfo:self repeats:YES] retain];
+            
+    refreshTimer = [[NSTimer scheduledTimerWithTimeInterval:30 
+                                                     target:self 
+                                                   selector:@selector(forceRefresh:) 
+                                                   userInfo:self 
+                                                    repeats:YES] retain];
+    @synchronized(self) {
+        browserActive = YES;
+    }
 }
 
-- (void)setPithos:(ASIPithos *)aPithos {
-    if (aPithos && [aPithos isNotEqualTo:pithos]) {
-        [self resetBrowser];
-        [pithos release];
-        pithos = [aPithos retain];
-        [self startBrowser];
-    }
+- (BOOL)operationsPending {
+    return ([moveNetworkQueue operationCount] || 
+            [copyNetworkQueue operationCount] || 
+            [deleteNetworkQueue operationCount] || 
+            [uploadNetworkQueue operationCount] || 
+            [downloadNetworkQueue operationCount] || 
+            [moveQueue operationCount] || 
+            [copyQueue operationCount] || 
+            [deleteQueue operationCount] || 
+            [uploadQueue operationCount] || 
+            [downloadQueue operationCount] || 
+            [moveCallbackQueue operationCount] || 
+            [copyCallbackQueue operationCount] || 
+            [deleteCallbackQueue operationCount] || 
+            [uploadCallbackQueue operationCount] || 
+            [downloadCallbackQueue operationCount]);
 }
 
-- (void)windowDidLoad {
-    [super windowDidLoad];
-    if (browser && !browserInitialized) {
-        browserInitialized = YES;
-        [self initBrowser];
+- (void)dealloc {
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+    [self resetBrowser];
+    [moveQueue release];
+    [copyQueue release];
+    [deleteQueue release];
+    [uploadQueue release];
+    [downloadQueue release];
+    [moveNetworkQueue release];
+    [copyNetworkQueue release];
+    [deleteNetworkQueue release];
+    [uploadNetworkQueue release];
+    [downloadNetworkQueue release];
+    [clipboardParentNode release];
+    [clipboardNodes release];
+    [draggedParentNode release];
+    [draggedNodes release];
+    [sharedPreviewController release];
+    [othersSharedNode release];
+    [mySharedNode release];
+    [sharedNode release];
+    [containersNodeChildren release];
+    [containersNode release];
+    [accountNode release];
+    [rootNode release];
+    [pithos release];
+    [super dealloc];
+}
+
+- (void)setPithos:(ASIPithos *)aPithos {
+    if (aPithos) {
+        if (![aPithos.authUser isEqualToString:pithos.authUser] || 
+            ![aPithos.authToken isEqualToString:pithos.authToken] || 
+            ![aPithos.storageURLPrefix isEqualToString:pithos.storageURLPrefix] ||
+            ![aPithos.publicURLPrefix isEqualToString:pithos.publicURLPrefix]) {
+            [self resetBrowser];
+            [pithos release];
+            pithos = [aPithos retain];
+            [self startBrowser];
+        } else {
+            [self startBrowser];
+        }
     }
 }
 
+
 #pragma mark -
 #pragma mark Observers
 
@@ -347,12 +479,13 @@
         // Create pithos node
         ASIPithosContainerRequest *containerRequest = [ASIPithosContainerRequest createOrUpdateContainerRequestWithPithos:pithos 
                                                                                                             containerName:@"pithos"];
-        [[PithosUtilities prepareRequest:containerRequest priority:NSOperationQueuePriorityVeryHigh] startAsynchronous];
-        while (![containerRequest isFinished]) {
-            usleep(1);
-        }
+        ASINetworkQueue *networkQueue = [ASINetworkQueue queue];
+        [networkQueue go];
+        [networkQueue addOperations:[NSArray arrayWithObject:[PithosUtilities prepareRequest:containerRequest]] waitUntilFinished:YES];
         if ([containerRequest error]) {
-            [PithosUtilities httpRequestErrorAlertWithRequest:containerRequest];
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [PithosUtilities httpRequestErrorAlertWithRequest:containerRequest];
+            });
         } else {
             refreshAccountNode = YES;
         }
@@ -361,12 +494,13 @@
         // Create trash node
         ASIPithosContainerRequest *containerRequest = [ASIPithosContainerRequest createOrUpdateContainerRequestWithPithos:pithos 
                                                                                                             containerName:@"trash"];
-        [[PithosUtilities prepareRequest:containerRequest priority:NSOperationQueuePriorityVeryHigh] startAsynchronous];
-        while (![containerRequest isFinished]) {
-            usleep(1);
-        }
+        ASINetworkQueue *networkQueue = [ASINetworkQueue queue];
+        [networkQueue go];
+        [networkQueue addOperations:[NSArray arrayWithObject:[PithosUtilities prepareRequest:containerRequest]] waitUntilFinished:YES];
         if ([containerRequest error]) {
-            [PithosUtilities httpRequestErrorAlertWithRequest:containerRequest];
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [PithosUtilities httpRequestErrorAlertWithRequest:containerRequest];
+            });
         } else {
             refreshAccountNode = YES;
         }
@@ -380,7 +514,7 @@
     // Expand the folder outline view
     [outlineView expandItem:nil expandChildren:YES];
     
-    if ((rootNode == nil) || (rootNode == containersNode) || (rootNode == sharedNode)) {
+    if (((rootNode == nil) || (rootNode == containersNode) || (rootNode == sharedNode)) && [containersNodeChildren count]) {
         rootNode = [containersNodeChildren objectAtIndex:0];
         [browser loadColumnZero];
     }
@@ -489,8 +623,13 @@
     }
     if (([node class] == [PithosObjectNode class]) || 
         (([node class] == [PithosSubdirNode class]) && !node.pithosObject.subdir && [node.pithosObject.name hasSuffix:@"/"])) {
-        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+        // Operation: Rename (move) an object or subdir/ node
+        __block NSOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
             NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+            if (operation.isCancelled) {
+                [pool drain];
+                return;
+            }
             NSString *destinationObjectName = [[node.pithosObject.name stringByDeletingLastPathComponent] stringByAppendingPathComponent:newName];
             if ([newName hasSuffix:@"/"])
                 destinationObjectName = [destinationObjectName stringByAppendingString:@"/"];
@@ -502,24 +641,30 @@
                                                 error:&error 
                                           isDirectory:&isDirectory 
                                        sharingAccount:nil]) {
-                NSAlert *alert = [[[NSAlert alloc] init] autorelease];
-                [alert setMessageText:@"Name Taken"];
-                [alert setInformativeText:[NSString stringWithFormat:@"The name '%@' is already taken. Please choose a different name", newName]];
-                [alert addButtonWithTitle:@"OK"];
-                [alert runModal];
+                dispatch_async(dispatch_get_main_queue(), ^{
+                    NSAlert *alert = [[[NSAlert alloc] init] autorelease];
+                    [alert setMessageText:@"Name Taken"];
+                    [alert setInformativeText:[NSString stringWithFormat:@"The name '%@' is already taken. Please choose a different name", newName]];
+                    [alert addButtonWithTitle:@"OK"];
+                    [alert runModal];
+                });
                 [pool drain];
                 return;
             } else if (error) {
                 [pool drain];
                 return;
             }
+            if (operation.isCancelled) {
+                [pool drain];
+                return;
+            }
             ASIPithosObjectRequest *objectRequest = [PithosUtilities moveObjectRequestWithPithos:pithos 
                                                                                    containerName:node.pithosContainer.name 
                                                                                       objectName:node.pithosObject.name 
                                                                         destinationContainerName:node.pithosContainer.name 
                                                                            destinationObjectName:destinationObjectName 
                                                                                    checkIfExists:NO];
-            if (objectRequest) {
+            if (!operation.isCancelled && objectRequest) {
                 objectRequest.delegate = self;
                 objectRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
                 objectRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
@@ -543,17 +688,24 @@
                   NSStringFromSelector(@selector(moveFinished:)), @"didFinishSelector", 
                   NSStringFromSelector(@selector(requestFailed:)), @"didFailSelector", 
                   moveNetworkQueue, @"networkQueue", 
-                  @"moveQueue", @"queueType", 
+                  @"move", @"operationType", 
                   nil]];
                 [moveNetworkQueue addOperation:[PithosUtilities prepareRequest:objectRequest priority:NSOperationQueuePriorityHigh]];
             }
             [pool drain];
-        });
+        }];
+        [moveQueue addOperation:operation];
     } else if ([node class] == [PithosSubdirNode class]) {
         if (firstSlashRange.length == 1)
             return;
-        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+        // Operation: Rename (move) a subdir node and its descendants
+        // The resulting ASIPithosObjectRequests are chained through dependencies
+        __block NSOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
             NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+            if (operation.isCancelled) {
+                [pool drain];
+                return;
+            }
             NSString *destinationObjectName = [[node.pithosObject.name stringByDeletingLastPathComponent] stringByAppendingPathComponent:newName];
             NSError *error = nil;
             BOOL isDirectory;
@@ -563,17 +715,23 @@
                                                 error:&error 
                                           isDirectory:&isDirectory 
                                        sharingAccount:nil]) {
-                NSAlert *alert = [[[NSAlert alloc] init] autorelease];
-                [alert setMessageText:@"Name Taken"];
-                [alert setInformativeText:[NSString stringWithFormat:@"The name '%@' is already taken. Please choose a different name", newName]];
-                [alert addButtonWithTitle:@"OK"];
-                [alert runModal];
+                dispatch_async(dispatch_get_main_queue(), ^{
+                    NSAlert *alert = [[[NSAlert alloc] init] autorelease];
+                    [alert setMessageText:@"Name Taken"];
+                    [alert setInformativeText:[NSString stringWithFormat:@"The name '%@' is already taken. Please choose a different name", newName]];
+                    [alert addButtonWithTitle:@"OK"];
+                    [alert runModal];
+                });
                 [pool drain];
                 return;
             } else if (error) {
                 [pool drain];
                 return;
             }
+            if (operation.isCancelled) {
+                [pool drain];
+                return;
+            }
             if (node.pithosObject.subdir)
                 destinationObjectName = [destinationObjectName stringByAppendingString:@"/"];
             NSArray *objectRequests = [PithosUtilities moveObjectRequestsForSubdirWithPithos:pithos 
@@ -582,8 +740,13 @@
                                                                     destinationContainerName:node.pithosContainer.name 
                                                                        destinationObjectName:destinationObjectName 
                                                                                checkIfExists:NO];
-            if (objectRequests) {
+            if (!operation.isCancelled && objectRequests) {
+                ASIPithosObjectRequest *previousObjectRequest = nil;
                 for (ASIPithosObjectRequest *objectRequest in objectRequests) {
+                    if (operation.isCancelled) {
+                        [pool drain];
+                        return;
+                    }
                     objectRequest.delegate = self;
                     objectRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
                     objectRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
@@ -607,13 +770,17 @@
                       NSStringFromSelector(@selector(moveFinished:)), @"didFinishSelector", 
                       NSStringFromSelector(@selector(requestFailed:)), @"didFailSelector", 
                       moveNetworkQueue, @"networkQueue", 
-                      @"moveQueue", @"queueType", 
+                      @"move", @"operationType", 
                       nil]];
+                    if (previousObjectRequest)
+                        [objectRequest addDependency:previousObjectRequest];
+                    previousObjectRequest = objectRequest;
                     [moveNetworkQueue addOperation:[PithosUtilities prepareRequest:objectRequest priority:NSOperationQueuePriorityHigh]];
                 }
             }
             [pool drain];
-        });
+        }];
+        [moveQueue addOperation:operation];
     }
 }
 
@@ -664,16 +831,27 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
             [alert addButtonWithTitle:@"Cancel"];
             NSInteger choice = [alert runModal];
             if (choice == NSAlertFirstButtonReturn) {
-                dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+                // Operation: Download a subdir node and its descendants
+                // The resulting ASIPithosObjectRequests are chained through dependencies
+                __block NSOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
                     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+                    if (operation.isCancelled) {
+                        [pool drain];
+                        return;
+                    }
                     NSArray *objectRequests = [PithosUtilities objectDataRequestsForSubdirWithPithos:pithos 
                                                                                        containerName:node.pithosContainer.name 
                                                                                           objectName:node.pithosObject.name 
                                                                                          toDirectory:[dropDestination path] 
                                                                                        checkIfExists:YES 
                                                                                       sharingAccount:node.sharingAccount];
-                    if (objectRequests) {
+                    if (!operation.isCancelled && objectRequests) {
+                        ASIPithosObjectRequest *previousObjectRequest = nil;
                         for (__block ASIPithosObjectRequest *objectRequest in objectRequests) {
+                            if (operation.isCancelled) {
+                                [pool drain];
+                                return;
+                            }
                             [names addObject:[objectRequest.userInfo objectForKey:@"fileName"]];
                             objectRequest.delegate = self;
                             objectRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
@@ -697,7 +875,7 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                               NSStringFromSelector(@selector(downloadObjectFinished:)), @"didFinishSelector", 
                               NSStringFromSelector(@selector(requestFailed:)), @"didFailSelector", 
                               downloadNetworkQueue, @"networkQueue", 
-                              @"downloadQueue", @"queueType", 
+                              @"download", @"operationType", 
                               nil]];
                             [objectRequest setBytesReceivedBlock:^(unsigned long long size, unsigned long long total){
                                 [activityFacility updateActivity:activity 
@@ -705,22 +883,31 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                                                       totalBytes:activity.totalBytes 
                                                     currentBytes:(activity.currentBytes + size)];
                             }];
+                            if (previousObjectRequest)
+                                [objectRequest addDependency:previousObjectRequest];
+                            previousObjectRequest = objectRequest;
                             [downloadNetworkQueue addOperation:[PithosUtilities prepareRequest:objectRequest]];
                         }
                     }
                     [pool drain];
-                });
+                }];
+                [downloadQueue addOperation:operation];
             }
         } else {
-            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+            // Operation: Download an object node
+            __block NSOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
                 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+                if (operation.isCancelled) {
+                    [pool drain];
+                    return;
+                }
                 __block ASIPithosObjectRequest *objectRequest = [PithosUtilities objectDataRequestWithPithos:pithos 
                                                                                                containerName:node.pithosContainer.name 
                                                                                                   objectName:node.pithosObject.name 
                                                                                                  toDirectory:[dropDestination path] 
                                                                                                checkIfExists:YES 
                                                                                               sharingAccount:node.sharingAccount];
-                if (objectRequest) {
+                if (!operation.isCancelled && objectRequest) {
                     [names addObject:[objectRequest.userInfo objectForKey:@"fileName"]];
                     objectRequest.delegate = self;
                     objectRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
@@ -744,7 +931,7 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                       NSStringFromSelector(@selector(downloadObjectFinished:)), @"didFinishSelector", 
                       NSStringFromSelector(@selector(requestFailed:)), @"didFailSelector", 
                       downloadNetworkQueue, @"networkQueue", 
-                      @"downloadQueue", @"queueType", 
+                      @"download", @"operationType", 
                       nil]];
                     [objectRequest setBytesReceivedBlock:^(unsigned long long size, unsigned long long total){
                         [activityFacility updateActivity:activity 
@@ -755,7 +942,8 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                     [downloadNetworkQueue addOperation:[PithosUtilities prepareRequest:objectRequest]];
                     [pool drain];
                 }
-            });
+            }];
+            [downloadQueue addOperation:operation];
         }
     }
     return names;
@@ -885,10 +1073,9 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
     if ((destinationNode.pithosContainer.blockHash == nil) || (destinationNode.pithosContainer.blockSize == 0)) {
         ASIPithosContainerRequest *containerRequest = [ASIPithosContainerRequest containerMetadataRequestWithPithos:pithos 
                                                                                                       containerName:containerName];
-        [[PithosUtilities prepareRequest:containerRequest priority:NSOperationQueuePriorityVeryHigh] startAsynchronous];
-        while (![containerRequest isFinished]) {
-            usleep(1);
-        }
+        ASINetworkQueue *networkQueue = [ASINetworkQueue queue];
+        [networkQueue go];
+        [networkQueue addOperations:[NSArray arrayWithObject:[PithosUtilities prepareRequest:containerRequest]] waitUntilFinished:YES];
         if ([containerRequest error]) {
             [PithosUtilities httpRequestErrorAlertWithRequest:containerRequest];
             return NO;
@@ -908,8 +1095,13 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
             if (!isDirectory) {
                 // Upload file
                 NSString *objectName = [objectNamePrefix stringByAppendingPathComponent:[filePath lastPathComponent]];
-                dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+                // Operation: Upload a local file
+                __block NSOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
                     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+                    if (operation.isCancelled) {
+                        [pool drain];
+                        return;
+                    }
                     NSError *error = nil;
                     NSString *contentType = [PithosUtilities contentTypeOfFile:filePath error:&error];
                     if (contentType == nil)
@@ -917,6 +1109,10 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                     if (error)
                         NSLog(@"contentType detection error: %@", error);
                     NSArray *hashes = nil;
+                    if (operation.isCancelled) {
+                        [pool drain];
+                        return;
+                    }
                     ASIPithosObjectRequest *objectRequest = [PithosUtilities writeObjectDataRequestWithPithos:pithos 
                                                                                                 containerName:containerName 
                                                                                                    objectName:objectName 
@@ -927,7 +1123,7 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                                                                                                 checkIfExists:YES 
                                                                                                        hashes:&hashes 
                                                                                                sharingAccount:destinationNode.sharingAccount];
-                    if (objectRequest) {
+                    if (!operation.isCancelled && objectRequest) {
                         objectRequest.delegate = self;
                         objectRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
                         objectRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
@@ -957,14 +1153,15 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                           NSStringFromSelector(@selector(uploadObjectUsingHashMapFinished:)), @"didFinishSelector", 
                           NSStringFromSelector(@selector(requestFailed:)), @"didFailSelector", 
                           uploadNetworkQueue, @"networkQueue", 
-                          @"uploadQueue", @"queueType", 
+                          @"upload", @"operationType", 
                           nil]];
                         if (destinationNode.sharingAccount)
                             [(NSMutableDictionary *)objectRequest.userInfo setObject:destinationNode.sharingAccount forKey:@"sharingAccount"];
                         [uploadNetworkQueue addOperation:[PithosUtilities prepareRequest:objectRequest]];
                     }
                     [pool drain];
-                });
+                }];
+                [uploadQueue addOperation:operation];
             } else {
                 // Upload directory, confirm first
                 NSAlert *alert = [[[NSAlert alloc] init] autorelease];
@@ -975,8 +1172,14 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                 NSInteger choice = [alert runModal];
                 if (choice == NSAlertFirstButtonReturn) {
                     NSString *objectName = [objectNamePrefix stringByAppendingPathComponent:[filePath lastPathComponent]];
-                    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+                    // Operation: Upload a local directory and its descendants
+                    // The resulting ASIPithosObjectRequests are chained through dependencies
+                    __block NSOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
                         NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+                        if (operation.isCancelled) {
+                            [pool drain];
+                            return;
+                        }
                         NSMutableArray *objectNames = nil;
                         NSMutableArray *contentTypes = nil;
                         NSMutableArray *filePaths = nil;
@@ -995,7 +1198,16 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                                                                                         hashesArrays:&hashesArrays 
                                                                              directoryObjectRequests:&directoryObjectRequests 
                                                                                       sharingAccount:destinationNode.sharingAccount];
+                        if (operation.isCancelled) {
+                            [pool drain];
+                            return;
+                        }
+                        ASIPithosObjectRequest *previousObjectRequest = nil;
                         for (ASIPithosObjectRequest *objectRequest in directoryObjectRequests) {
+                            if (operation.isCancelled) {
+                                [pool drain];
+                                return;
+                            }
                             objectRequest.delegate = self;
                             objectRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
                             objectRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
@@ -1014,12 +1226,19 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                               NSStringFromSelector(@selector(uploadDirectoryObjectFinished:)), @"didFinishSelector", 
                               NSStringFromSelector(@selector(requestFailed:)), @"didFailSelector", 
                               uploadNetworkQueue, @"networkQueue", 
-                              @"uploadQueue", @"queueType", 
+                              @"upload", @"queue", 
                               nil]];
+                            if (previousObjectRequest)
+                                [objectRequest addDependency:previousObjectRequest];
+                            previousObjectRequest = objectRequest;
                             [uploadNetworkQueue addOperation:[PithosUtilities prepareRequest:objectRequest]];
                         }
-                        if (objectRequests) {
+                        if (!operation.isCancelled && objectRequests) {
                             for (NSUInteger i = 0 ; i < [objectRequests count] ; i++) {
+                                if (operation.isCancelled) {
+                                    [pool drain];
+                                    return;
+                                }
                                 ASIPithosObjectRequest *objectRequest = [objectRequests objectAtIndex:i];
                                 objectRequest.delegate = self;
                                 objectRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
@@ -1049,15 +1268,19 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                                   NSStringFromSelector(@selector(uploadObjectUsingHashMapFinished:)), @"didFinishSelector", 
                                   NSStringFromSelector(@selector(requestFailed:)), @"didFailSelector", 
                                   uploadNetworkQueue, @"networkQueue", 
-                                  @"uploadQueue", @"queueType", 
+                                  @"upload", @"queue", 
                                   nil]];
                                 if (destinationNode.sharingAccount)
                                     [(NSMutableDictionary *)objectRequest.userInfo setObject:destinationNode.sharingAccount forKey:@"sharingAccount"];
+                                if (previousObjectRequest)
+                                    [objectRequest addDependency:previousObjectRequest];
+                                previousObjectRequest = objectRequest;
                                 [uploadNetworkQueue addOperation:[PithosUtilities prepareRequest:objectRequest]];
                             }
                         }
                         [pool drain];
-                    });
+                    }];
+                    [uploadQueue addOperation:operation];
                 }
             }
         }
@@ -1079,8 +1302,13 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
     for (PithosNode *node in nodes) {
         if (([node class] == [PithosObjectNode class]) || 
             (([node class] == [PithosSubdirNode class]) && !node.pithosObject.subdir && [node.pithosObject.name hasSuffix:@"/"])) {
-            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+            // Operation: Move an object or subdir/ node
+            __block NSOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
                 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+                if (operation.isCancelled) {
+                    [pool drain];
+                    return;
+                }
                 NSString *destinationObjectName = [objectNamePrefix stringByAppendingPathComponent:node.displayName];
                 if ([node.pithosObject.name hasSuffix:@"/"])
                     destinationObjectName = [destinationObjectName stringByAppendingString:@"/"];
@@ -1090,7 +1318,7 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                                                                             destinationContainerName:containerName 
                                                                                destinationObjectName:destinationObjectName 
                                                                                        checkIfExists:YES];
-                if (objectRequest) {
+                if (!operation.isCancelled && objectRequest) {
                     objectRequest.delegate = self;
                     objectRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
                     objectRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
@@ -1113,15 +1341,22 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                       NSStringFromSelector(@selector(moveFinished:)), @"didFinishSelector", 
                       NSStringFromSelector(@selector(requestFailed:)), @"didFailSelector", 
                       moveNetworkQueue, @"networkQueue", 
-                      @"moveQueue", @"queueType", 
+                      @"move", @"operationType", 
                       nil]];
                     [moveNetworkQueue addOperation:[PithosUtilities prepareRequest:objectRequest priority:NSOperationQueuePriorityHigh]];
                 }
                 [pool drain];
-            });
+            }];
+            [moveQueue addOperation:operation];
         } else if ([node class] == [PithosSubdirNode class]) {
-            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+            // Operation: Move a subdir node and its descendants
+            // The resulting ASIPithosObjectRequests are chained through dependencies
+            __block NSOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
                 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+                if (operation.isCancelled) {
+                    [pool drain];
+                    return;
+                }
                 NSString *destinationObjectName = [objectNamePrefix stringByAppendingPathComponent:node.displayName];
                 if (node.pithosObject.subdir)
                     destinationObjectName = [destinationObjectName stringByAppendingString:@"/"];
@@ -1131,8 +1366,13 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                                                                         destinationContainerName:containerName 
                                                                            destinationObjectName:destinationObjectName 
                                                                                    checkIfExists:YES];
-                if (objectRequests) {
+                if (!operation.isCancelled && objectRequests) {
+                    ASIPithosObjectRequest *previousObjectRequest = nil;
                     for (ASIPithosObjectRequest *objectRequest in objectRequests) {
+                        if (operation.isCancelled) {
+                            [pool drain];
+                            return;
+                        }
                         objectRequest.delegate = self;
                         objectRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
                         objectRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
@@ -1156,13 +1396,17 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                           NSStringFromSelector(@selector(moveFinished:)), @"didFinishSelector", 
                           NSStringFromSelector(@selector(requestFailed:)), @"didFailSelector", 
                           moveNetworkQueue, @"networkQueue", 
-                          @"moveQueue", @"queueType", 
+                          @"move", @"operationType", 
                           nil]];
+                        if (previousObjectRequest)
+                            [objectRequest addDependency:previousObjectRequest];
+                        previousObjectRequest = objectRequest;
                         [moveNetworkQueue addOperation:[PithosUtilities prepareRequest:objectRequest priority:NSOperationQueuePriorityHigh]];
                     }
                 }
                 [pool drain];
-            });
+            }];
+            [moveQueue addOperation:operation];
         }
     }
     return YES;
@@ -1182,8 +1426,13 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
     for (PithosNode *node in nodes) {
         if (([node class] == [PithosObjectNode class]) || 
             (([node class] == [PithosSubdirNode class]) && !node.pithosObject.subdir && [node.pithosObject.name hasSuffix:@"/"])) {
-            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+            // Operation: Copy an object or subdir/ node
+            __block NSOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
                 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+                if (operation.isCancelled) {
+                    [pool drain];
+                    return;
+                }
                 NSString *destinationObjectName;
                 if (![destinationNode isEqualTo:node.parent]) {
                     destinationObjectName = [objectNamePrefix stringByAppendingPathComponent:node.displayName];
@@ -1194,6 +1443,10 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                                                                        containerName:containerName 
                                                                           objectName:node.pithosObject.name];
                 }
+                if (operation.isCancelled) {
+                    [pool drain];
+                    return;
+                }
                 ASIPithosObjectRequest *objectRequest = [PithosUtilities copyObjectRequestWithPithos:pithos 
                                                                                        containerName:node.pithosContainer.name 
                                                                                           objectName:node.pithosObject.name 
@@ -1201,7 +1454,7 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                                                                                destinationObjectName:destinationObjectName 
                                                                                        checkIfExists:YES 
                                                                                       sharingAccount:node.sharingAccount];
-                if (objectRequest) {
+                if (!operation.isCancelled && objectRequest) {
                     objectRequest.delegate = self;
                     objectRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
                     objectRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
@@ -1224,15 +1477,22 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                       NSStringFromSelector(@selector(copyFinished:)), @"didFinishSelector", 
                       NSStringFromSelector(@selector(requestFailed:)), @"didFailSelector", 
                       copyNetworkQueue, @"networkQueue", 
-                      @"copyQueue", @"queueType", 
+                      @"copy", @"operationType", 
                       nil]];
                     [copyNetworkQueue addOperation:[PithosUtilities prepareRequest:objectRequest priority:NSOperationQueuePriorityHigh]];
                 }
                 [pool drain];
-            });
+            }];
+            [copyQueue addOperation:operation];
         } else if ([node class] == [PithosSubdirNode class]) {
-            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+            // Operation: Copy a subdir node and its descendants
+            // The resulting ASIPithosObjectRequests are chained through dependencies
+            __block NSOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
                 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+                if (operation.isCancelled) {
+                    [pool drain];
+                    return;
+                }
                 NSString *destinationObjectName;
                 if (![destinationNode isEqualTo:node.parent]) {
                     destinationObjectName = [objectNamePrefix stringByAppendingPathComponent:node.displayName];
@@ -1243,6 +1503,10 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                                                                        containerName:containerName 
                                                                           subdirName:node.pithosObject.name];
                 }
+                if (operation.isCancelled) {
+                    [pool drain];
+                    return;
+                }
                 NSArray *objectRequests = [PithosUtilities copyObjectRequestsForSubdirWithPithos:pithos 
                                                                                    containerName:node.pithosContainer.name 
                                                                                       objectName:node.pithosObject.name 
@@ -1250,8 +1514,13 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                                                                            destinationObjectName:destinationObjectName 
                                                                                    checkIfExists:YES 
                                                                                   sharingAccount:node.sharingAccount];
-                if (objectRequests) {
+                if (!operation.isCancelled && objectRequests) {
+                    ASIPithosObjectRequest *previousObjectRequest = nil;
                     for (ASIPithosObjectRequest *objectRequest in objectRequests) {
+                        if (operation.isCancelled) {
+                            [pool drain];
+                            return;
+                        }
                         objectRequest.delegate = self;
                         objectRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
                         objectRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
@@ -1274,13 +1543,17 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                           NSStringFromSelector(@selector(copyFinished:)), @"didFinishSelector", 
                           NSStringFromSelector(@selector(requestFailed:)), @"didFailSelector", 
                           copyNetworkQueue, @"networkQueue", 
-                          @"copyQueue", @"queueType", 
+                          @"copy", @"operationType", 
                           nil]];
+                        if (previousObjectRequest)
+                            [objectRequest addDependency:previousObjectRequest];
+                        previousObjectRequest = objectRequest;
                         [copyNetworkQueue addOperation:[PithosUtilities prepareRequest:objectRequest priority:NSOperationQueuePriorityHigh]];
                     }
                 }
                 [pool drain];
-            });
+            }];
+            [copyQueue addOperation:operation];
         }
     }
     return YES;
@@ -1290,47 +1563,93 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
 #pragma mark ASIHTTPRequestDelegate
 
 - (void)performRequestFinishedDelegateInBackground:(ASIPithosRequest *)request {
-    dispatch_queue_t queue;
-    if ([[request.userInfo objectForKey:@"queueType"] isEqualToString:@"moveQueue"])
-        queue = moveQueue;
-    else if ([[request.userInfo objectForKey:@"queueType"] isEqualToString:@"copyQueue"])
-        queue = copyQueue;
-    else if ([[request.userInfo objectForKey:@"queueType"] isEqualToString:@"deleteQueue"])
-        queue = deleteQueue;
-    else if ([[request.userInfo objectForKey:@"queueType"] isEqualToString:@"uploadQueue"])
-        queue = uploadQueue;
-    else if ([[request.userInfo objectForKey:@"queueType"] isEqualToString:@"downloadQueue"])
-        queue = downloadQueue;
+    NSOperationQueue *callbackQueue;
+    NSString *operationType = [request.userInfo objectForKey:@"operationType"];
+    if ([operationType isEqualToString:@"move"])
+        callbackQueue = moveCallbackQueue;
+    else if ([operationType isEqualToString:@"copy"])
+        callbackQueue = copyCallbackQueue;
+    else if ([operationType isEqualToString:@"delete"])
+        callbackQueue = deleteCallbackQueue;
+    else if ([operationType isEqualToString:@"upload"])
+        callbackQueue = uploadCallbackQueue;
+    else if ([operationType isEqualToString:@"download"])
+        callbackQueue = downloadCallbackQueue;
     else
-        return;
-    dispatch_async(queue, ^{
-        [self performSelector:NSSelectorFromString([request.userInfo objectForKey:@"didFinishSelector"]) withObject:request];
-    });
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [activityFacility endActivity:[request.userInfo objectForKey:@"activity"] 
+                              withMessage:[request.userInfo objectForKey:@"stoppedActivityMessage"]];
+        });
+    // Add an operation to the callbackQueue with a completionBlock for the case of cancellation
+    NSInvocationOperation *operation = [[[NSInvocationOperation alloc] initWithTarget:self 
+                                                                             selector:NSSelectorFromString([request.userInfo objectForKey:@"didFinishSelector"]) 
+                                                                               object:request] autorelease];
+    operation.completionBlock = ^{
+        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+        if ([[request.userInfo objectForKey:@"operation"] isCancelled]) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [activityFacility endActivity:[request.userInfo objectForKey:@"activity"] 
+                                  withMessage:[request.userInfo objectForKey:@"stoppedActivityMessage"]];
+            });
+        }
+        [pool drain];
+    };
+    [(NSMutableDictionary *)request.userInfo setObject:operation forKey:@"operation"];
+    [callbackQueue addOperation:operation];
 }
 
 - (void)performRequestFailedDelegateInBackground:(ASIPithosRequest *)request {
-    dispatch_queue_t queue;
-    if ([[request.userInfo objectForKey:@"queueType"] isEqualToString:@"moveQueue"])
-        queue = moveQueue;
-    else if ([[request.userInfo objectForKey:@"queueType"] isEqualToString:@"copyQueue"])
-        queue = copyQueue;
-    else if ([[request.userInfo objectForKey:@"queueType"] isEqualToString:@"deleteQueue"])
-        queue = deleteQueue;
-    else if ([[request.userInfo objectForKey:@"queueType"] isEqualToString:@"uploadQueue"])
-        queue = uploadQueue;
-    else if ([[request.userInfo objectForKey:@"queueType"] isEqualToString:@"downloadQueue"])
-        queue = downloadQueue;
-    else
-        return;
-    dispatch_async(queue, ^{
-        [self performSelector:NSSelectorFromString([request.userInfo objectForKey:@"didFailSelector"]) withObject:request];
-    });
+    if (request.isCancelled) {
+        // Request has been cancelled 
+        // The callbackQueue might be suspended so we call directly the callback method, since it does minimal work anyway
+        [self performSelector:NSSelectorFromString([request.userInfo objectForKey:@"didFailSelector"]) 
+                   withObject:request];
+    } else {
+        NSOperationQueue *callbackQueue;
+        NSString *operationType = [request.userInfo objectForKey:@"operationType"];
+        if ([operationType isEqualToString:@"move"])
+            callbackQueue = moveCallbackQueue;
+        else if ([operationType isEqualToString:@"copy"])
+            callbackQueue = copyCallbackQueue;
+        else if ([operationType isEqualToString:@"delete"])
+            callbackQueue = deleteCallbackQueue;
+        else if ([operationType isEqualToString:@"upload"])
+            callbackQueue = uploadCallbackQueue;
+        else if ([operationType isEqualToString:@"download"])
+            callbackQueue = downloadCallbackQueue;
+        else
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [activityFacility endActivity:[request.userInfo objectForKey:@"activity"] 
+                                  withMessage:[request.userInfo objectForKey:@"stoppedActivityMessage"]];
+            });
+        // Add an operation to the callbackQueue with a completionBlock for the case of cancellation
+        NSInvocationOperation *operation = [[[NSInvocationOperation alloc] initWithTarget:self 
+                                                                                 selector:NSSelectorFromString([request.userInfo objectForKey:@"didFailSelector"]) 
+                                                                                   object:request] autorelease];
+        operation.completionBlock = ^{
+            NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+            if ([[request.userInfo objectForKey:@"operation"] isCancelled]) {
+                dispatch_async(dispatch_get_main_queue(), ^{
+                    [activityFacility endActivity:[request.userInfo objectForKey:@"activity"] 
+                                      withMessage:[request.userInfo objectForKey:@"stoppedActivityMessage"]];
+                });
+            }
+            [pool drain];
+        };
+        [(NSMutableDictionary *)request.userInfo setObject:operation forKey:@"operation"];
+        [callbackQueue addOperation:operation];
+    }
 }
 
 - (void)requestFailed:(ASIPithosRequest *)request {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    NSOperation *operation = [request.userInfo objectForKey:@"operation"];
     NSLog(@"Request failed: %@", request.url);
-    if ([request isCancelled]) {
+    if (operation.isCancelled) {
+        [pool drain];
+        return;        
+    }
+    if (request.isCancelled) {
         dispatch_async(dispatch_get_main_queue(), ^{
             [activityFacility endActivity:[request.userInfo objectForKey:@"activity"] 
                               withMessage:[request.userInfo objectForKey:@"stoppedActivityMessage"]];
@@ -1359,8 +1678,11 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
 
 - (void)downloadObjectFinished:(ASIPithosObjectRequest *)objectRequest {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    NSOperation *operation = [objectRequest.userInfo objectForKey:@"operation"];
     NSLog(@"Download finished: %@", objectRequest.url);
-    if (objectRequest.responseStatusCode == 200) {
+    if (operation.isCancelled) {
+        [self requestFailed:objectRequest];
+    } else if (objectRequest.responseStatusCode == 200) {
         NSString *filePath = [objectRequest.userInfo objectForKey:@"filePath"];
         PithosActivity *activity = [objectRequest.userInfo objectForKey:@"activity"];
         NSUInteger totalBytes = activity.totalBytes;
@@ -1400,8 +1722,11 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
 
 - (void)uploadDirectoryObjectFinished:(ASIPithosObjectRequest *)objectRequest {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    NSOperation *operation = [objectRequest.userInfo objectForKey:@"operation"];
     NSLog(@"Upload directory object finished: %@", objectRequest.url);
-    if (objectRequest.responseStatusCode == 201) {
+    if (operation.isCancelled) {
+        [self requestFailed:objectRequest];
+    } else if (objectRequest.responseStatusCode == 201) {
         NSLog(@"Directory object created: %@", objectRequest.url);
         dispatch_async(dispatch_get_main_queue(), ^{
             [activityFacility endActivity:[objectRequest.userInfo objectForKey:@"activity"] 
@@ -1426,12 +1751,15 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
 
 - (void)uploadObjectUsingHashMapFinished:(ASIPithosObjectRequest *)objectRequest {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    NSOperation *operation = [objectRequest.userInfo objectForKey:@"operation"];
     NSLog(@"Upload using hashmap finished: %@", objectRequest.url);
     NSString *fileName = [objectRequest.userInfo objectForKey:@"fileName"];
     PithosActivity *activity = [objectRequest.userInfo objectForKey:@"activity"];
     NSUInteger totalBytes = activity.totalBytes;
     NSUInteger currentBytes = activity.currentBytes;
-    if (objectRequest.responseStatusCode == 201) {
+    if (operation.isCancelled) {
+        [self requestFailed:objectRequest];
+    } else if (objectRequest.responseStatusCode == 201) {
         NSLog(@"Object created: %@", objectRequest.url);
         dispatch_async(dispatch_get_main_queue(), ^{
             [activityFacility endActivity:activity 
@@ -1510,11 +1838,14 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
 
 - (void)uploadMissingBlockFinished:(ASIPithosContainerRequest *)containerRequest {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    NSOperation *operation = [containerRequest.userInfo objectForKey:@"operation"];
     NSLog(@"Upload of missing block finished: %@", containerRequest.url);
     NSUInteger blockSize = [[containerRequest.userInfo objectForKey:@"blockSize"] unsignedIntegerValue];
     NSString *fileName = [containerRequest.userInfo objectForKey:@"fileName"];
     PithosActivity *activity = [containerRequest.userInfo objectForKey:@"activity"];
-    if (containerRequest.responseStatusCode == 202) {
+    if (operation.isCancelled) {
+        [self requestFailed:containerRequest];
+    } else if (containerRequest.responseStatusCode == 202) {
         NSIndexSet *missingBlocks = [containerRequest.userInfo objectForKey:@"missingBlocks"];
         NSUInteger missingBlockIndex = [[containerRequest.userInfo objectForKey:@"missingBlockIndex"] unsignedIntegerValue];
         missingBlockIndex = [missingBlocks indexGreaterThanIndex:missingBlockIndex];
@@ -1569,8 +1900,11 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
 
 - (void)moveFinished:(ASIPithosObjectRequest *)objectRequest {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    NSOperation *operation = [objectRequest.userInfo objectForKey:@"operation"];
     NSLog(@"Move object finished: %@", objectRequest.url);
-    if (objectRequest.responseStatusCode == 201) {
+    if (operation.isCancelled) {
+        [self requestFailed:objectRequest];
+    } else if (objectRequest.responseStatusCode == 201) {
         dispatch_async(dispatch_get_main_queue(), ^{
             [activityFacility endActivity:[objectRequest.userInfo objectForKey:@"activity"] 
                               withMessage:[objectRequest.userInfo objectForKey:@"finishedActivityMessage"]];
@@ -1594,8 +1928,11 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
 
 - (void)copyFinished:(ASIPithosObjectRequest *)objectRequest {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    NSOperation *operation = [objectRequest.userInfo objectForKey:@"operation"];
     NSLog(@"Copy object finished: %@", objectRequest.url);
-    if (objectRequest.responseStatusCode == 201) {
+    if (operation.isCancelled) {
+        [self requestFailed:objectRequest];
+    } else if (objectRequest.responseStatusCode == 201) {
         dispatch_async(dispatch_get_main_queue(), ^{
             [activityFacility endActivity:[objectRequest.userInfo objectForKey:@"activity"] 
                               withMessage:[objectRequest.userInfo objectForKey:@"finishedActivityMessage"]];
@@ -1619,8 +1956,11 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
 
 - (void)deleteObjectFinished:(ASIPithosObjectRequest *)objectRequest {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    NSOperation *operation = [objectRequest.userInfo objectForKey:@"operation"];
     NSLog(@"Delete object finished: %@", objectRequest.url);
-    if (objectRequest.responseStatusCode == 204) {
+    if (operation.isCancelled) {
+        [self requestFailed:objectRequest];
+    } else if (objectRequest.responseStatusCode == 204) {
         dispatch_async(dispatch_get_main_queue(), ^{
             [activityFacility endActivity:[objectRequest.userInfo objectForKey:@"activity"] 
                               withMessage:[objectRequest.userInfo objectForKey:@"finishedActivityMessage"]];
@@ -1945,12 +2285,21 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
 - (void)menuNewFolder:(NSMenuItem *)sender {
     PithosNode *node = (PithosNode *)[sender representedObject];
     if ([node class] == [PithosContainerNode class]) {
-        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+        // Operation: Create (upload) a new root application/directory object
+        __block NSOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
             NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+            if (operation.isCancelled) {
+                [pool drain];
+                return;
+            }
             NSString *safeObjectName = [PithosUtilities safeSubdirNameForPithos:pithos 
                                                                   containerName:node.pithosContainer.name 
                                                                      subdirName:@"untitled folder"];
             NSString *fileName = [safeObjectName lastPathComponent];
+            if (operation.isCancelled) {
+                [pool drain];
+                return;
+            }
             ASIPithosObjectRequest *objectRequest = [ASIPithosObjectRequest writeObjectDataRequestWithPithos:pithos 
                                                                                                containerName:node.pithosContainer.name 
                                                                                                   objectName:safeObjectName 
@@ -1982,19 +2331,29 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                                       NSStringFromSelector(@selector(uploadDirectoryObjectFinished:)), @"didFinishSelector", 
                                       NSStringFromSelector(@selector(requestFailed:)), @"didFailSelector", 
                                       uploadNetworkQueue, @"networkQueue", 
-                                      @"uploadQueue", @"queueType", 
+                                      @"upload", @"operationType", 
                                       nil];
             [uploadNetworkQueue addOperation:[PithosUtilities prepareRequest:objectRequest priority:NSOperationQueuePriorityHigh]];
             [pool drain];
-        });
+        }];
+        [uploadQueue addOperation:operation];
     } else if (([node class] == [PithosSubdirNode class]) && 
                (node.pithosObject.subdir || ![node.pithosObject.name hasSuffix:@"/"])) {
-        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+        // Operation: Create (upload) a new aplication/directory object
+        __block NSOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
             NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+            if (operation.isCancelled) {
+                [pool drain];
+                return;
+            }
             NSString *safeObjectName = [PithosUtilities safeSubdirNameForPithos:pithos 
                                                                   containerName:node.pithosContainer.name 
                                                                      subdirName:[node.pithosObject.name stringByAppendingPathComponent:@"untitled folder"]];
             NSString *fileName = [safeObjectName lastPathComponent];
+            if (operation.isCancelled) {
+                [pool drain];
+                return;
+            }
             ASIPithosObjectRequest *objectRequest = [ASIPithosObjectRequest writeObjectDataRequestWithPithos:pithos 
                                                                                                containerName:node.pithosContainer.name 
                                                                                                   objectName:safeObjectName 
@@ -2026,11 +2385,12 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                                       NSStringFromSelector(@selector(uploadDirectoryObjectFinished:)), @"didFinishSelector", 
                                       NSStringFromSelector(@selector(requestFailed:)), @"didFailSelector", 
                                       uploadNetworkQueue, @"networkQueue", 
-                                      @"uploadQueue", @"queueType", 
+                                      @"upload", @"operationType", 
                                       nil];
             [uploadNetworkQueue addOperation:[PithosUtilities prepareRequest:objectRequest priority:NSOperationQueuePriorityHigh]];
             [pool drain];
-        });
+        }];
+        [uploadQueue addOperation:operation];
     }
 }
 
@@ -2044,14 +2404,23 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
     for (PithosNode *node in ((NSArray *)[sender representedObject])) {
         if (([node class] == [PithosObjectNode class]) || 
             (([node class] == [PithosSubdirNode class]) && !node.pithosObject.subdir && [node.pithosObject.name hasSuffix:@"/"])) {
-            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+            // Operation: Delete an object or subdir/ node
+            __block NSOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
                 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+                if (operation.isCancelled) {
+                    [pool drain];
+                    return;
+                }
                 NSString *fileName = [node.pithosObject.name lastPathComponent];
                 if ([node.pithosObject.name hasSuffix:@"/"])
                     fileName = [fileName stringByAppendingString:@"/"];
                 ASIPithosObjectRequest *objectRequest = [ASIPithosObjectRequest deleteObjectRequestWithPithos:pithos 
                                                                                                 containerName:node.pithosContainer.name 
                                                                                                    objectName:node.pithosObject.name];
+                if (operation.isCancelled) {
+                    [pool drain];
+                    return;
+                }
                 objectRequest.delegate = self;
                 objectRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
                 objectRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
@@ -2070,19 +2439,31 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                                           NSStringFromSelector(@selector(deleteObjectFinished:)), @"didFinishSelector", 
                                           NSStringFromSelector(@selector(requestFailed:)), @"didFailSelector", 
                                           deleteNetworkQueue, @"networkQueue", 
-                                          @"deleteQueue", @"queueType", 
+                                          @"delete", @"operationType", 
                                           nil];
                 [deleteNetworkQueue addOperation:[PithosUtilities prepareRequest:objectRequest priority:NSOperationQueuePriorityHigh]];
                 [pool drain];
-            });
+            }];
+            [deleteQueue addOperation:operation];
         } else if ([node class] == [PithosSubdirNode class]) {
-            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+            // Operation: Delete a subdir node and its descendants
+            // The resulting ASIPithosObjectRequests are chained through dependencies
+            __block NSOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
                 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+                if (operation.isCancelled) {
+                    [pool drain];
+                    return;
+                }
                 NSArray *objectRequests = [PithosUtilities deleteObjectRequestsForSubdirWithPithos:pithos 
                                                                                      containerName:node.pithosContainer.name 
                                                                                         objectName:node.pithosObject.name];
-                if (objectRequests) {
+                if (!operation.isCancelled && objectRequests) {
+                    ASIPithosObjectRequest *previousObjectRequest = nil;
                     for (ASIPithosObjectRequest *objectRequest in objectRequests) {
+                        if (operation.isCancelled) {
+                            [pool drain];
+                            return;
+                        }
                         objectRequest.delegate = self;
                         objectRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
                         objectRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
@@ -2101,13 +2482,17 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                           NSStringFromSelector(@selector(deleteObjectFinished:)), @"didFinishSelector", 
                           NSStringFromSelector(@selector(requestFailed:)), @"didFailSelector", 
                           deleteNetworkQueue, @"networkQueue", 
-                          @"deleteQueue", @"queueType", 
+                          @"delete", @"operationType", 
                           nil]];
+                        if (previousObjectRequest)
+                            [objectRequest addDependency:previousObjectRequest];
+                        previousObjectRequest = objectRequest;
                         [deleteNetworkQueue addOperation:[PithosUtilities prepareRequest:objectRequest priority:NSOperationQueuePriorityHigh]];
                     }
                 }
                 [pool drain];
-            });
+            }];
+            [deleteQueue addOperation:operation];
         }
     }
 }
@@ -2118,19 +2503,24 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
             (([node class] == [PithosSubdirNode class]) && 
              !node.pithosObject.subdir &&
              [node.pithosObject.name hasSuffix:@"/"])) {
-            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+            // Operation: Move to trash an object or subdir/ node
+            __block NSOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
                 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+                if (operation.isCancelled) {
+                    [pool drain];
+                    return;
+                }
                 NSString *safeObjectName = [PithosUtilities safeObjectNameForPithos:pithos 
                                                                       containerName:@"trash" 
                                                                          objectName:node.pithosObject.name];
-                if (safeObjectName) {
+                if (!operation.isCancelled && safeObjectName) {
                     ASIPithosObjectRequest *objectRequest = [PithosUtilities moveObjectRequestWithPithos:pithos 
                                                                                            containerName:node.pithosContainer.name 
                                                                                               objectName:node.pithosObject.name 
                                                                                 destinationContainerName:@"trash" 
                                                                                    destinationObjectName:safeObjectName 
                                                                                            checkIfExists:NO];
-                    if (objectRequest) {
+                    if (!operation.isCancelled && objectRequest) {
                         objectRequest.delegate = self;
                         objectRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
                         objectRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
@@ -2153,28 +2543,40 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                           NSStringFromSelector(@selector(moveFinished:)), @"didFinishSelector", 
                           NSStringFromSelector(@selector(requestFailed:)), @"didFailSelector", 
                           moveNetworkQueue, @"networkQueue", 
-                          @"moveQueue", @"queueType", 
+                          @"move", @"operationType", 
                           nil]];
                         [moveNetworkQueue addOperation:[PithosUtilities prepareRequest:objectRequest priority:NSOperationQueuePriorityHigh]];
                     }
                 }
                 [pool drain];
-            });
+            }];
+            [moveQueue addOperation:operation];
         } else if ([node class] == [PithosSubdirNode class]) {
-            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+            // Operation: Move to trash a subdir node and its descendants
+            // The resulting ASIPithosObjectRequests are chained through dependencies
+            __block NSOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
                 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+                if (operation.isCancelled) {
+                    [pool drain];
+                    return;
+                }
                 NSString *safeObjectName = [PithosUtilities safeSubdirNameForPithos:pithos 
                                                                       containerName:@"trash" 
                                                                          subdirName:node.pithosObject.name];
-                if (safeObjectName) {
+                if (!operation.isCancelled && safeObjectName) {
                     NSArray *objectRequests = [PithosUtilities moveObjectRequestsForSubdirWithPithos:pithos 
                                                                                        containerName:node.pithosContainer.name 
                                                                                           objectName:node.pithosObject.name 
                                                                             destinationContainerName:@"trash" 
                                                                                destinationObjectName:safeObjectName 
                                                                                        checkIfExists:NO];
-                    if (objectRequests) {
+                    if (!operation.isCancelled && objectRequests) {
+                        ASIPithosObjectRequest *previousObjectRequest = nil;
                         for (ASIPithosObjectRequest *objectRequest in objectRequests) {
+                            if (operation.isCancelled) {
+                                [pool drain];
+                                return;
+                            }
                             objectRequest.delegate = self;
                             objectRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
                             objectRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
@@ -2197,14 +2599,18 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                               NSStringFromSelector(@selector(moveFinished:)), @"didFinishSelector", 
                               NSStringFromSelector(@selector(requestFailed:)), @"didFailSelector", 
                               moveNetworkQueue, @"networkQueue", 
-                              @"moveQueue", @"queueType", 
+                              @"move", @"operationType", 
                               nil]];
+                            if (previousObjectRequest)
+                                [objectRequest addDependency:previousObjectRequest];
+                            previousObjectRequest = objectRequest;
                             [moveNetworkQueue addOperation:[PithosUtilities prepareRequest:objectRequest priority:NSOperationQueuePriorityHigh]];
                         }
                     }
                 }
                 [pool drain];
-            });
+            }];
+            [moveQueue addOperation:operation];
         }
     }
 }
diff --git a/pithos-macos/PithosContainerNode.m b/pithos-macos/PithosContainerNode.m
index 0f866b3..1752a0c 100644
--- a/pithos-macos/PithosContainerNode.m
+++ b/pithos-macos/PithosContainerNode.m
@@ -106,6 +106,15 @@ static NSImage *sharedIcon = nil;
 #pragma mark -
 #pragma mark Properties
 
+- (void)setPithos:(ASIPithos *)aPithos {
+    if (aPithos && ![aPithos isEqualTo:pithos]) {
+        [pithos release];
+        pithos = [aPithos retain];
+        [url release];
+        url = nil;
+    }
+}
+
 - (NSString *)url {
     if (url == nil)
         url = [[NSString alloc] initWithFormat:@"%@/%@%@", 
@@ -413,17 +422,39 @@ static NSImage *sharedIcon = nil;
 
 - (void)containerMetadataRequestFailed:(ASIPithosContainerRequest *)request {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    if ([request isEqualTo:applyMetadataContainerRequest]) {
-        [PithosUtilities httpRequestErrorAlertWithRequest:applyMetadataContainerRequest];
-        @synchronized(self) {
-            [applyMetadataContainerRequest release];
-            applyMetadataContainerRequest = nil;
+    NSUInteger retries = [[request.userInfo objectForKey:@"retries"] unsignedIntegerValue];
+    if (retries > 0) {
+        ASIPithosContainerRequest *newRequest = (ASIPithosContainerRequest *)[PithosUtilities copyRequest:request];
+        [(NSMutableDictionary *)(newRequest.userInfo)setObject:[NSNumber numberWithUnsignedInteger:(--retries)] forKey:@"retries"];
+        if ([request isEqualTo:applyMetadataContainerRequest]) {
+            @synchronized(self) {
+                [applyMetadataContainerRequest release];
+                applyMetadataContainerRequest = newRequest;
+            }
+        } else if ([request isEqualTo:refreshMetadataContainerRequest]) {
+            @synchronized(self) {
+                [refreshMetadataContainerRequest release];
+                refreshMetadataContainerRequest = newRequest;
+            }
         }
-    } else if ([request isEqualTo:refreshMetadataContainerRequest]) {
-        [PithosUtilities httpRequestErrorAlertWithRequest:refreshMetadataContainerRequest];
-        @synchronized(self) {
-            [refreshMetadataContainerRequest release];
-            refreshMetadataContainerRequest = nil;
+        [[PithosUtilities prepareRequest:newRequest priority:[[newRequest.userInfo objectForKey:@"priority"] integerValue]] startAsynchronous];
+    } else {
+        if ([request isEqualTo:applyMetadataContainerRequest]) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [PithosUtilities httpRequestErrorAlertWithRequest:applyMetadataContainerRequest];
+            });
+            @synchronized(self) {
+                [applyMetadataContainerRequest release];
+                applyMetadataContainerRequest = nil;
+            }
+        } else if ([request isEqualTo:refreshMetadataContainerRequest]) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [PithosUtilities httpRequestErrorAlertWithRequest:refreshMetadataContainerRequest];
+            });
+            @synchronized(self) {
+                [refreshMetadataContainerRequest release];
+                refreshMetadataContainerRequest = nil;
+            }
         }
     }
     [pool drain];
diff --git a/pithos-macos/PithosObjectNode.m b/pithos-macos/PithosObjectNode.m
index a3afc36..9f6f4e0 100644
--- a/pithos-macos/PithosObjectNode.m
+++ b/pithos-macos/PithosObjectNode.m
@@ -78,6 +78,15 @@
 #pragma mark -
 #pragma mark Properties
 
+- (void)setPithos:(ASIPithos *)aPithos {
+    if (aPithos && ![aPithos isEqualTo:pithos]) {
+        [pithos release];
+        pithos = [aPithos retain];
+        [url release];
+        url = nil;
+    }
+}
+
 - (NSString *)url {
     if (url == nil)
         url = [[NSString alloc] initWithFormat:@"object %@/%@/%@%@", 
@@ -153,17 +162,39 @@
 
 - (void)objectRequestFailed:(ASIPithosObjectRequest *)request {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    if ([request isEqualTo:applyMetadataObjectRequest]) {
-        [PithosUtilities httpRequestErrorAlertWithRequest:applyMetadataObjectRequest];
-        @synchronized(self) {
-            [applyMetadataObjectRequest release];
-            applyMetadataObjectRequest = nil;
+    NSUInteger retries = [[request.userInfo objectForKey:@"retries"] unsignedIntegerValue];
+    if (retries > 0) {
+        ASIPithosObjectRequest *newRequest = (ASIPithosObjectRequest *)[PithosUtilities copyRequest:request];
+        [(NSMutableDictionary *)(newRequest.userInfo)setObject:[NSNumber numberWithUnsignedInteger:(--retries)] forKey:@"retries"];
+        if ([request isEqualTo:applyMetadataObjectRequest]) {
+            @synchronized(self) {
+                [applyMetadataObjectRequest release];
+                applyMetadataObjectRequest = newRequest;
+            }
+        } else if ([request isEqualTo:refreshMetadataObjectRequest]) {
+            @synchronized(self) {
+                [refreshMetadataObjectRequest release];
+                refreshMetadataObjectRequest = newRequest;
+            }
         }
-    } else if ([request isEqualTo:refreshMetadataObjectRequest]) {
-        [PithosUtilities httpRequestErrorAlertWithRequest:refreshMetadataObjectRequest];
-        @synchronized(self) {
-            [refreshMetadataObjectRequest release];
-            refreshMetadataObjectRequest = nil;
+        [[PithosUtilities prepareRequest:newRequest priority:[[newRequest.userInfo objectForKey:@"priority"] integerValue]] startAsynchronous];
+    } else {
+        if ([request isEqualTo:applyMetadataObjectRequest]) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [PithosUtilities httpRequestErrorAlertWithRequest:applyMetadataObjectRequest];
+            });
+            @synchronized(self) {
+                [applyMetadataObjectRequest release];
+                applyMetadataObjectRequest = nil;
+            }
+        } else if ([request isEqualTo:refreshMetadataObjectRequest]) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [PithosUtilities httpRequestErrorAlertWithRequest:refreshMetadataObjectRequest];
+            });
+            @synchronized(self) {
+                [refreshMetadataObjectRequest release];
+                refreshMetadataObjectRequest = nil;
+            }
         }
     }
     [pool drain];
diff --git a/pithos-macos/PithosPreferencesController.h b/pithos-macos/PithosPreferencesController.h
index c14d19a..5fd4245 100644
--- a/pithos-macos/PithosPreferencesController.h
+++ b/pithos-macos/PithosPreferencesController.h
@@ -2,7 +2,7 @@
 //  PithosPreferencesController.h
 //  pithos-macos
 //
-// Copyright 2011 GRNET S.A. All rights reserved.
+// Copyright 2011-2012 GRNET S.A. All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or
 // without modification, are permitted provided that the following
@@ -37,25 +37,64 @@
 
 #import <Cocoa/Cocoa.h>
 @class PithosBrowserController;
+@class PithosAccount;
 
 @interface PithosPreferencesController : NSWindowController <NSWindowDelegate> {
     PithosBrowserController *pithosBrowserController;
+    PithosAccount *selectedPithosAccount;
     
-    NSDictionaryController *groupsDictionaryController;
-    NSDictionaryController *selectedGroupMembersDictionaryController;
+    NSArrayController *accountsArrayController;
     
+    BOOL accountRemoveEnable;
+    
+    NSString *serverURL;
+    NSString *authUser;
+    NSString *authToken;
     BOOL manual;
+    BOOL loginEnable;
+    BOOL loginCancelEnable;
+    
+    BOOL syncActive;
+    NSString *syncDirectoryPath;
+    BOOL syncApplyEnable;
+    BOOL syncCancelEnable;
+    
+    NSDictionaryController *groupsDictionaryController;
+    NSDictionaryController *selectedGroupMembersDictionaryController;
 }
 
 @property (nonatomic, assign) IBOutlet PithosBrowserController *pithosBrowserController;
+@property (nonatomic, retain) PithosAccount *selectedPithosAccount;
+
+@property (nonatomic, assign) IBOutlet NSArrayController *accountsArrayController;
+
+@property (nonatomic, assign) BOOL accountRemoveEnable;
+
+@property (nonatomic, retain) NSString *serverURL;
+@property (nonatomic, retain) NSString *authUser;
+@property (nonatomic, retain) NSString *authToken;
+@property (nonatomic, assign) BOOL manual;
+@property (nonatomic, assign) BOOL loginEnable;
+@property (nonatomic, assign) BOOL loginCancelEnable;
+
+@property (nonatomic, assign) BOOL syncActive;
+@property (nonatomic, retain) NSString *syncDirectoryPath;
+@property (nonatomic, assign) BOOL syncApplyEnable;
+@property (nonatomic, assign) BOOL syncCancelEnable;
 
 @property (nonatomic, assign) IBOutlet NSDictionaryController *groupsDictionaryController;
 @property (nonatomic, assign) IBOutlet NSDictionaryController *selectedGroupMembersDictionaryController;
 
-@property (nonatomic, assign) BOOL manual;
+//- (IBAction)toolbarItemSelected:(id)sender;
 
-- (IBAction)toolbarItemSelected:(id)sender;
+- (IBAction)addAccount:(id)sender;
+- (IBAction)removeAccount:(id)sender;
+- (IBAction)login:(id)sender;
+- (IBAction)loginCancel:(id)sender;
+- (IBAction)syncApply:(id)sender;
+- (IBAction)syncCancel:(id)sender;
+- (IBAction)groupsApply:(id)sender;
+- (IBAction)groupsRevert:(id)sender;
 
-- (IBAction)authenticationLogin:(id)sender;
 
 @end
diff --git a/pithos-macos/PithosPreferencesController.m b/pithos-macos/PithosPreferencesController.m
index 8a0f982..db4aa5d 100644
--- a/pithos-macos/PithosPreferencesController.m
+++ b/pithos-macos/PithosPreferencesController.m
@@ -2,7 +2,7 @@
 //  PithosPreferencesController.m
 //  pithos-macos
 //
-// Copyright 2011 GRNET S.A. All rights reserved.
+// Copyright 2011-2012 GRNET S.A. All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or
 // without modification, are permitted provided that the following
@@ -38,12 +38,16 @@
 #import "PithosPreferencesController.h"
 #import "PithosBrowserController.h"
 #import "PithosAccountNode.h"
+#import "PithosAccount.h"
 #import "pithos_macosAppDelegate.h"
 
 @implementation PithosPreferencesController
-@synthesize pithosBrowserController;
+@synthesize pithosBrowserController, selectedPithosAccount;
+@synthesize accountsArrayController;
+@synthesize accountRemoveEnable;
+@synthesize serverURL, authUser, authToken, manual, loginEnable, loginCancelEnable;
 @synthesize groupsDictionaryController, selectedGroupMembersDictionaryController;
-@synthesize manual;
+@synthesize syncActive, syncDirectoryPath, syncApplyEnable, syncCancelEnable;
 
 #pragma mark -
 #pragma mark Object Lifecycle
@@ -59,8 +63,8 @@
     [window setHidesOnDeactivate:NO];
     [window setExcludedFromWindowsMenu:YES];
     
-	// Select the first tab when the window is loaded for the first time.
-	[[window valueForKeyPath:@"toolbar"] setSelectedItemIdentifier:@"0"];
+//	// Select the first tab when the window is loaded for the first time.
+//	[[window valueForKeyPath:@"toolbar"] setSelectedItemIdentifier:@"0"];
 
     [groupsDictionaryController setInitialKey:@"group"];
     [groupsDictionaryController setInitialValue:@"user"];
@@ -68,46 +72,203 @@
     [selectedGroupMembersDictionaryController setInitialValue:@""];
 
     [window setDelegate:self];
+    
+    self.selectedPithosAccount = [[accountsArrayController selectedObjects] objectAtIndex:0];
+    [accountsArrayController addObserver:self forKeyPath:@"selection" options:NSKeyValueObservingOptionNew context:NULL];
 }
 
-- (void)windowWillClose:(NSNotification *)notification {
-    self.manual = NO;
+- (BOOL)windowShouldClose:(id)sender {
+    return [(pithos_macosAppDelegate *)[[NSApplication sharedApplication] delegate] activated];
 }
 
-- (IBAction)toolbarItemSelected:(id)sender {
+//- (void)windowWillClose:(NSNotification *)notification {
+//}
+
+//- (IBAction)toolbarItemSelected:(id)sender {
+//}
+
+#pragma mark -
+#pragma Observers
+
+- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
+    if ([object isEqualTo:accountsArrayController] && 
+        [keyPath isEqualToString:@"selection"] && 
+        [[accountsArrayController selectedObjects] count]) {
+        self.selectedPithosAccount = [[accountsArrayController selectedObjects] objectAtIndex:0];
+    }
+}
+
+#pragma mark -
+#pragma Update
+
+- (void)updateAccounts {
+    pithos_macosAppDelegate *delegate = (pithos_macosAppDelegate *)[[NSApplication sharedApplication] delegate];
+    self.accountRemoveEnable = (delegate.activated && ([delegate.pithosAccounts count] > 1));
+}
+
+- (void)updateLogin {
+    self.loginEnable = ([selectedPithosAccount urlIsValid:serverURL] && (!manual || ([authUser length] && [authToken length])));
+    self.loginCancelEnable = (![selectedPithosAccount.serverURL isEqualToString:serverURL] || 
+                              (selectedPithosAccount.authUser && ![selectedPithosAccount.authUser isEqualToString:authUser]) || 
+                              (selectedPithosAccount.authToken && ![selectedPithosAccount.authToken isEqualToString:authToken]));
+}
+
+- (void)updateSync {
+    BOOL isDirectory;
+    self.syncApplyEnable = (selectedPithosAccount.active && 
+                            ((selectedPithosAccount.syncActive != syncActive) || 
+                             (![selectedPithosAccount.syncDirectoryPath isEqualToString:syncDirectoryPath] && 
+                              (![[NSFileManager defaultManager] fileExistsAtPath:syncDirectoryPath isDirectory:&isDirectory] || 
+                               isDirectory))));
+    self.syncCancelEnable = (selectedPithosAccount.active && 
+                             ((selectedPithosAccount.syncActive != syncActive) || 
+                              ![selectedPithosAccount.syncDirectoryPath isEqualToString:syncDirectoryPath]));
 }
 
 #pragma mark -
 #pragma Properties
 
+- (void)setSelectedPithosAccount:(PithosAccount *)aSelectedPithosAccount {
+    if (aSelectedPithosAccount && ![aSelectedPithosAccount isEqualTo:selectedPithosAccount]) {
+        [selectedPithosAccount release];
+        selectedPithosAccount = [aSelectedPithosAccount retain];
+        
+        [self updateAccounts];
+        [self loginCancel:self];
+        [self syncCancel:self];
+        [self groupsRevert:self];
+    }
+}
+
+#pragma Login Properties
+
+- (void)setServerURL:(NSString *)aServerURL {
+    [serverURL release];
+    serverURL = [aServerURL copy];
+    [self updateLogin];
+}
+
+- (void)setAuthUser:(NSString *)anAuthUser {
+    [authUser release];
+    authUser = [anAuthUser copy];
+    [self updateLogin];
+}
+
+- (void)setAuthToken:(NSString *)anAuthToken {
+    [authToken release];
+    authToken = [anAuthToken copy];
+    [self updateLogin];
+}
+
 - (void)setManual:(BOOL)aManual {
     manual = aManual;
+    [self updateLogin];
     if (!manual) {
-        NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
-        [userDefaults setObject:[userDefaults stringForKey:@"previousAuthUser"] forKey:@"authUser"];
-        [userDefaults setObject:[userDefaults stringForKey:@"previousAuthToken"] forKey:@"authToken"];
-        [userDefaults synchronize];
+        self.authUser = [[selectedPithosAccount.authUser copy] autorelease];
+        self.authToken = [[selectedPithosAccount.authToken copy] autorelease];
     }
 }
 
+#pragma Sync Properties
+
+- (void)setSyncActive:(BOOL)aSyncActive {
+    syncActive = aSyncActive;
+    [self updateSync];
+}
+
+- (void)setSyncDirectoryPath:(NSString *)aSyncDirectoryPath {
+    [syncDirectoryPath release];
+    syncDirectoryPath = [aSyncDirectoryPath copy];
+    [self updateSync];
+}
+
 #pragma mark -
-#pragma Authentication Actions
+#pragma Actions
+
+- (IBAction)addAccount:(id)sender {
+    [accountsArrayController addObject:[PithosAccount pithosAccount]];
+    [self updateAccounts];
+    pithos_macosAppDelegate *delegate = (pithos_macosAppDelegate *)[[NSApplication sharedApplication] delegate];
+    [delegate.pithosAccountsDictionary setObject:selectedPithosAccount forKey:selectedPithosAccount.name];
+    [delegate savePithosAccounts:self];
+}
+
+- (IBAction)removeAccount:(id)sender {
+    [self updateAccounts];
+    if (!accountRemoveEnable)
+        return;
+    PithosAccount *removedPithosAccount = [selectedPithosAccount retain];
+    pithos_macosAppDelegate *delegate = (pithos_macosAppDelegate *)[[NSApplication sharedApplication] delegate];
+    if ([delegate.currentPithosAccount isEqualTo:removedPithosAccount] && [delegate.pithosBrowserController operationsPending]) {
+        NSAlert *alert = [[[NSAlert alloc] init] autorelease];
+        [alert setMessageText:@"Operations Pending"];
+        [alert setInformativeText:@"There are pending operations in the browser, do you want to remove the account and cancel them?"];
+        [alert addButtonWithTitle:@"OK"];
+        [alert addButtonWithTitle:@"Cancel"];
+        NSInteger choice = [alert runModal];
+        if (choice == NSAlertSecondButtonReturn) {
+            [removedPithosAccount release];
+            return;
+        }
+    }
+    [accountsArrayController removeObject:selectedPithosAccount];
+    [delegate.pithosAccountsDictionary removeObjectForKey:removedPithosAccount.name];
+    [delegate removedPithosAccount:removedPithosAccount];
+    [delegate savePithosAccounts:self];
+    [removedPithosAccount release];
+    [self updateAccounts];
+}
+
+#pragma Login Actions
 
-- (IBAction)authenticationLogin:(id)sender {
-    if (manual) {
-        [[self window] makeFirstResponder:nil];
-        [(pithos_macosAppDelegate *)[[NSApplication sharedApplication] delegate] authenticate];
+- (IBAction)login:(id)sender {
+    if (!manual) {
+        [selectedPithosAccount loginWithServerURL:serverURL];
     } else {
-        [(pithos_macosAppDelegate *)[[NSApplication sharedApplication] delegate] login];
+        [selectedPithosAccount authenticateWithServerURL:serverURL authUser:authUser authToken:authToken];
+        self.manual = NO;
+        pithos_macosAppDelegate *delegate = (pithos_macosAppDelegate *)[[NSApplication sharedApplication] delegate];
+        [delegate savePithosAccounts:self];
+        if (!delegate.activated) {
+            delegate.activated = YES;
+            [delegate showPithosBrowser:self];
+        }
+        if ([selectedPithosAccount isEqualTo:delegate.currentPithosAccount])
+            delegate.pithosBrowserController.pithos = selectedPithosAccount.pithos;
     }
 }
 
-#pragma mark -
+- (IBAction)loginCancel:(id)server {
+    self.serverURL = [[selectedPithosAccount.serverURL copy] autorelease];
+    self.authUser = [[selectedPithosAccount.authUser copy] autorelease];
+    self.authToken = [[selectedPithosAccount.authToken copy] autorelease];
+}
+
+#pragma Sync Actions
+
+- (IBAction)syncApply:(id)sender {
+    [selectedPithosAccount updateSyncWithSyncActive:syncActive syncDirectoryPath:syncDirectoryPath];
+    [self updateSync];
+    pithos_macosAppDelegate *delegate = (pithos_macosAppDelegate *)[[NSApplication sharedApplication] delegate];
+    [delegate savePithosAccounts:self];
+}
+
+- (IBAction)syncCancel:(id)sender {
+    self.syncActive = selectedPithosAccount.syncActive;
+    self.syncDirectoryPath = [[selectedPithosAccount.syncDirectoryPath copy] autorelease];
+}
+
 #pragma mark Groups Actions
 
-- (void)applyGroups {
+- (IBAction)groupsApply:(id)sender {
     [[self window] makeFirstResponder:nil];
-    [pithosBrowserController.accountNode applyInfo];
+    if (selectedPithosAccount.active)
+        [selectedPithosAccount.accountNode applyInfo];
+}
+
+- (IBAction)groupsRevert:(id)sender {
+    if (selectedPithosAccount.active && selectedPithosAccount.accountNode)
+        [selectedPithosAccount.accountNode refreshInfo];
 }
 
 @end
diff --git a/pithos-macos/PithosPreferencesController.xib b/pithos-macos/PithosPreferencesController.xib
index ed45a36..3959f0e 100644
--- a/pithos-macos/PithosPreferencesController.xib
+++ b/pithos-macos/PithosPreferencesController.xib
@@ -1,38 +1,36 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
 	<data>
-		<int key="IBDocument.SystemTarget">1060</int>
-		<string key="IBDocument.SystemVersion">10K549</string>
-		<string key="IBDocument.InterfaceBuilderVersion">1938</string>
-		<string key="IBDocument.AppKitVersion">1038.36</string>
-		<string key="IBDocument.HIToolboxVersion">461.00</string>
+		<int key="IBDocument.SystemTarget">1070</int>
+		<string key="IBDocument.SystemVersion">11D50b</string>
+		<string key="IBDocument.InterfaceBuilderVersion">2177</string>
+		<string key="IBDocument.AppKitVersion">1138.32</string>
+		<string key="IBDocument.HIToolboxVersion">568.00</string>
 		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
 			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
-			<string key="NS.object.0">1938</string>
+			<string key="NS.object.0">2177</string>
 		</object>
 		<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
 			<bool key="EncodedWithXMLCoder">YES</bool>
-			<string>NSPathCell</string>
-			<string>NSToolbarItem</string>
+			<string>NSDictionaryController</string>
+			<string>NSScroller</string>
+			<string>NSTableHeaderView</string>
 			<string>NSButton</string>
-			<string>NSCustomObject</string>
-			<string>NSTableView</string>
-			<string>NSTextField</string>
-			<string>NSWindowTemplate</string>
+			<string>NSArrayController</string>
+			<string>NSScrollView</string>
 			<string>NSTextFieldCell</string>
 			<string>NSButtonCell</string>
-			<string>NSTableColumn</string>
 			<string>NSBox</string>
-			<string>NSView</string>
-			<string>NSDictionaryController</string>
-			<string>NSToolbar</string>
-			<string>NSScrollView</string>
-			<string>NSTabViewItem</string>
-			<string>NSUserDefaultsController</string>
-			<string>NSPathControl</string>
-			<string>NSScroller</string>
-			<string>NSTableHeaderView</string>
+			<string>NSPathCell</string>
+			<string>NSTableView</string>
 			<string>NSTabView</string>
+			<string>NSPathControl</string>
+			<string>NSCustomObject</string>
+			<string>NSTabViewItem</string>
+			<string>NSView</string>
+			<string>NSWindowTemplate</string>
+			<string>NSTableColumn</string>
+			<string>NSTextField</string>
 		</object>
 		<object class="NSArray" key="IBDocument.PluginDependencies">
 			<bool key="EncodedWithXMLCoder">YES</bool>
@@ -56,156 +54,321 @@
 			<object class="NSWindowTemplate" id="183740387">
 				<int key="NSWindowStyleMask">3</int>
 				<int key="NSWindowBacking">2</int>
-				<string key="NSWindowRect">{{403, 468}, {265, 159}}</string>
+				<string key="NSWindowRect">{{403, 468}, {425, 262}}</string>
 				<int key="NSWTFlags">1954022400</int>
 				<string key="NSWindowTitle">Pithos+ Preferences</string>
 				<string key="NSWindowClass">NSWindow</string>
-				<object class="NSToolbar" key="NSViewClass" id="164109647">
-					<object class="NSMutableString" key="NSToolbarIdentifier">
-						<characters key="NS.bytes">E03AA9E7-49CC-4B42-AFD8-98034E482341</characters>
-					</object>
-					<nil key="NSToolbarDelegate"/>
-					<bool key="NSToolbarPrefersToBeShown">YES</bool>
-					<bool key="NSToolbarShowsBaselineSeparator">YES</bool>
-					<bool key="NSToolbarAllowsUserCustomization">NO</bool>
-					<bool key="NSToolbarAutosavesConfiguration">NO</bool>
-					<int key="NSToolbarDisplayMode">1</int>
-					<int key="NSToolbarSizeMode">1</int>
-					<object class="NSMutableDictionary" key="NSToolbarIBIdentifiedItems">
+				<nil key="NSViewClass"/>
+				<nil key="NSUserInterfaceItemIdentifier"/>
+				<string key="NSWindowContentMaxSize">{425, 262}</string>
+				<string key="NSWindowContentMinSize">{425, 262}</string>
+				<object class="NSView" key="NSWindowView" id="369507901">
+					<reference key="NSNextResponder"/>
+					<int key="NSvFlags">274</int>
+					<object class="NSMutableArray" key="NSSubviews">
 						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>16C40F9F-7895-4E0A-9FAE-C1854DDC3902</string>
-							<string>643A9C77-8691-4CBA-A6FC-3C11E1B55252</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<object class="NSToolbarItem" id="902282627">
-								<object class="NSMutableString" key="NSToolbarItemIdentifier">
-									<characters key="NS.bytes">16C40F9F-7895-4E0A-9FAE-C1854DDC3902</characters>
+						<object class="NSScrollView" id="419137310">
+							<reference key="NSNextResponder" ref="369507901"/>
+							<int key="NSvFlags">276</int>
+							<object class="NSMutableArray" key="NSSubviews">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSClipView" id="475745140">
+									<reference key="NSNextResponder" ref="419137310"/>
+									<int key="NSvFlags">2304</int>
+									<object class="NSMutableArray" key="NSSubviews">
+										<bool key="EncodedWithXMLCoder">YES</bool>
+										<object class="NSTableView" id="260212452">
+											<reference key="NSNextResponder" ref="475745140"/>
+											<int key="NSvFlags">256</int>
+											<string key="NSFrameSize">{118, 177}</string>
+											<reference key="NSSuperview" ref="475745140"/>
+											<reference key="NSWindow"/>
+											<reference key="NSNextKeyView" ref="366650902"/>
+											<string key="NSReuseIdentifierKey">_NS:1828</string>
+											<bool key="NSEnabled">YES</bool>
+											<object class="NSTableHeaderView" key="NSHeaderView" id="152792208">
+												<reference key="NSNextResponder" ref="316124907"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrameSize">{118, 17}</string>
+												<reference key="NSSuperview" ref="316124907"/>
+												<reference key="NSWindow"/>
+												<reference key="NSNextKeyView" ref="475745140"/>
+												<string key="NSReuseIdentifierKey">_NS:1830</string>
+												<reference key="NSTableView" ref="260212452"/>
+											</object>
+											<object class="_NSCornerView" key="NSCornerView">
+												<nil key="NSNextResponder"/>
+												<int key="NSvFlags">-2147483392</int>
+												<string key="NSFrame">{{224, 0}, {16, 17}}</string>
+												<string key="NSReuseIdentifierKey">_NS:1833</string>
+											</object>
+											<object class="NSMutableArray" key="NSTableColumns">
+												<bool key="EncodedWithXMLCoder">YES</bool>
+												<object class="NSTableColumn" id="742841349">
+													<double key="NSWidth">115</double>
+													<double key="NSMinWidth">40</double>
+													<double key="NSMaxWidth">1000</double>
+													<object class="NSTableHeaderCell" key="NSHeaderCell">
+														<int key="NSCellFlags">75628096</int>
+														<int key="NSCellFlags2">2048</int>
+														<string key="NSContents">Accounts</string>
+														<object class="NSFont" key="NSSupport" id="26">
+															<string key="NSName">LucidaGrande</string>
+															<double key="NSSize">11</double>
+															<int key="NSfFlags">3100</int>
+														</object>
+														<object class="NSColor" key="NSBackgroundColor">
+															<int key="NSColorSpace">3</int>
+															<bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes>
+														</object>
+														<object class="NSColor" key="NSTextColor" id="60462442">
+															<int key="NSColorSpace">6</int>
+															<string key="NSCatalogName">System</string>
+															<string key="NSColorName">headerTextColor</string>
+															<object class="NSColor" key="NSColor" id="960107716">
+																<int key="NSColorSpace">3</int>
+																<bytes key="NSWhite">MAA</bytes>
+															</object>
+														</object>
+													</object>
+													<object class="NSTextFieldCell" key="NSDataCell" id="142142913">
+														<int key="NSCellFlags">337772096</int>
+														<int key="NSCellFlags2">2048</int>
+														<string key="NSContents">Text Cell</string>
+														<object class="NSFont" key="NSSupport" id="271467070">
+															<string key="NSName">LucidaGrande</string>
+															<double key="NSSize">13</double>
+															<int key="NSfFlags">1044</int>
+														</object>
+														<reference key="NSControlView" ref="260212452"/>
+														<object class="NSColor" key="NSBackgroundColor" id="512560731">
+															<int key="NSColorSpace">6</int>
+															<string key="NSCatalogName">System</string>
+															<string key="NSColorName">controlBackgroundColor</string>
+															<object class="NSColor" key="NSColor" id="6151139">
+																<int key="NSColorSpace">3</int>
+																<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
+															</object>
+														</object>
+														<object class="NSColor" key="NSTextColor" id="44104873">
+															<int key="NSColorSpace">6</int>
+															<string key="NSCatalogName">System</string>
+															<string key="NSColorName">controlTextColor</string>
+															<reference key="NSColor" ref="960107716"/>
+														</object>
+													</object>
+													<int key="NSResizingMask">3</int>
+													<bool key="NSIsResizeable">YES</bool>
+													<bool key="NSIsEditable">YES</bool>
+													<reference key="NSTableView" ref="260212452"/>
+												</object>
+											</object>
+											<double key="NSIntercellSpacingWidth">3</double>
+											<double key="NSIntercellSpacingHeight">2</double>
+											<object class="NSColor" key="NSBackgroundColor" id="712919987">
+												<int key="NSColorSpace">3</int>
+												<bytes key="NSWhite">MQA</bytes>
+											</object>
+											<object class="NSColor" key="NSGridColor" id="1055172989">
+												<int key="NSColorSpace">6</int>
+												<string key="NSCatalogName">System</string>
+												<string key="NSColorName">gridColor</string>
+												<object class="NSColor" key="NSColor">
+													<int key="NSColorSpace">3</int>
+													<bytes key="NSWhite">MC41AA</bytes>
+												</object>
+											</object>
+											<double key="NSRowHeight">17</double>
+											<int key="NSTvFlags">-700448768</int>
+											<reference key="NSDelegate"/>
+											<reference key="NSDataSource"/>
+											<int key="NSColumnAutoresizingStyle">4</int>
+											<int key="NSDraggingSourceMaskForLocal">15</int>
+											<int key="NSDraggingSourceMaskForNonLocal">0</int>
+											<bool key="NSAllowsTypeSelect">YES</bool>
+											<int key="NSTableViewDraggingDestinationStyle">0</int>
+											<int key="NSTableViewGroupRowStyle">1</int>
+										</object>
+									</object>
+									<string key="NSFrame">{{1, 17}, {118, 177}}</string>
+									<reference key="NSSuperview" ref="419137310"/>
+									<reference key="NSWindow"/>
+									<reference key="NSNextKeyView" ref="260212452"/>
+									<string key="NSReuseIdentifierKey">_NS:1826</string>
+									<reference key="NSDocView" ref="260212452"/>
+									<reference key="NSBGColor" ref="512560731"/>
+									<int key="NScvFlags">4</int>
 								</object>
-								<string key="NSToolbarItemLabel">General</string>
-								<string key="NSToolbarItemPaletteLabel">General</string>
-								<string key="NSToolbarItemToolTip"/>
-								<nil key="NSToolbarItemView"/>
-								<object class="NSCustomResource" key="NSToolbarItemImage">
-									<string key="NSClassName">NSImage</string>
-									<string key="NSResourceName">NSPreferencesGeneral</string>
+								<object class="NSScroller" id="310368570">
+									<reference key="NSNextResponder" ref="419137310"/>
+									<int key="NSvFlags">-2147483392</int>
+									<string key="NSFrame">{{224, 17}, {15, 102}}</string>
+									<reference key="NSSuperview" ref="419137310"/>
+									<reference key="NSWindow"/>
+									<reference key="NSNextKeyView" ref="287845150"/>
+									<string key="NSReuseIdentifierKey">_NS:1845</string>
+									<reference key="NSTarget" ref="419137310"/>
+									<string key="NSAction">_doScroller:</string>
+									<double key="NSCurValue">37</double>
+									<double key="NSPercent">0.1947367936372757</double>
 								</object>
-								<nil key="NSToolbarItemTarget"/>
-								<nil key="NSToolbarItemAction"/>
-								<string key="NSToolbarItemMinSize">{0, 0}</string>
-								<string key="NSToolbarItemMaxSize">{0, 0}</string>
-								<bool key="NSToolbarItemEnabled">YES</bool>
-								<bool key="NSToolbarItemAutovalidates">YES</bool>
-								<int key="NSToolbarItemTag">-1</int>
-								<bool key="NSToolbarIsUserRemovable">YES</bool>
-								<int key="NSToolbarItemVisibilityPriority">0</int>
-							</object>
-							<object class="NSToolbarItem" id="1048882913">
-								<object class="NSMutableString" key="NSToolbarItemIdentifier">
-									<characters key="NS.bytes">643A9C77-8691-4CBA-A6FC-3C11E1B55252</characters>
+								<object class="NSScroller" id="366650902">
+									<reference key="NSNextResponder" ref="419137310"/>
+									<int key="NSvFlags">-2147483392</int>
+									<string key="NSFrame">{{1, 48.325627356767654}, {82.028970718383789, 15}}</string>
+									<reference key="NSSuperview" ref="419137310"/>
+									<reference key="NSWindow"/>
+									<reference key="NSNextKeyView" ref="310368570"/>
+									<string key="NSReuseIdentifierKey">_NS:1847</string>
+									<int key="NSsFlags">1</int>
+									<reference key="NSTarget" ref="419137310"/>
+									<string key="NSAction">_doScroller:</string>
+									<double key="NSPercent">0.55782312925170063</double>
 								</object>
-								<string key="NSToolbarItemLabel">Groups</string>
-								<string key="NSToolbarItemPaletteLabel">Groups</string>
-								<string key="NSToolbarItemToolTip"/>
-								<nil key="NSToolbarItemView"/>
-								<object class="NSCustomResource" key="NSToolbarItemImage">
-									<string key="NSClassName">NSImage</string>
-									<string key="NSResourceName">NSEveryone</string>
+								<object class="NSClipView" id="316124907">
+									<reference key="NSNextResponder" ref="419137310"/>
+									<int key="NSvFlags">2304</int>
+									<object class="NSMutableArray" key="NSSubviews">
+										<bool key="EncodedWithXMLCoder">YES</bool>
+										<reference ref="152792208"/>
+									</object>
+									<string key="NSFrame">{{1, 0}, {118, 17}}</string>
+									<reference key="NSSuperview" ref="419137310"/>
+									<reference key="NSWindow"/>
+									<reference key="NSNextKeyView" ref="152792208"/>
+									<string key="NSReuseIdentifierKey">_NS:1831</string>
+									<reference key="NSDocView" ref="152792208"/>
+									<reference key="NSBGColor" ref="512560731"/>
+									<int key="NScvFlags">4</int>
 								</object>
-								<nil key="NSToolbarItemTarget"/>
-								<nil key="NSToolbarItemAction"/>
-								<string key="NSToolbarItemMinSize">{0, 0}</string>
-								<string key="NSToolbarItemMaxSize">{0, 0}</string>
-								<bool key="NSToolbarItemEnabled">YES</bool>
-								<bool key="NSToolbarItemAutovalidates">YES</bool>
-								<int key="NSToolbarItemTag">-1</int>
-								<bool key="NSToolbarIsUserRemovable">YES</bool>
-								<int key="NSToolbarItemVisibilityPriority">0</int>
 							</object>
+							<string key="NSFrame">{{20, 47}, {120, 195}}</string>
+							<reference key="NSSuperview" ref="369507901"/>
+							<reference key="NSWindow"/>
+							<reference key="NSNextKeyView" ref="316124907"/>
+							<string key="NSReuseIdentifierKey">_NS:1824</string>
+							<int key="NSsFlags">133682</int>
+							<reference key="NSVScroller" ref="310368570"/>
+							<reference key="NSHScroller" ref="366650902"/>
+							<reference key="NSContentView" ref="475745140"/>
+							<reference key="NSHeaderClipView" ref="316124907"/>
+							<bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
 						</object>
-					</object>
-					<object class="NSArray" key="NSToolbarIBAllowedItems">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<reference ref="902282627"/>
-						<reference ref="1048882913"/>
-					</object>
-					<object class="NSArray" key="NSToolbarIBDefaultItems">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<reference ref="902282627"/>
-						<reference ref="1048882913"/>
-					</object>
-					<object class="NSArray" key="NSToolbarIBSelectableItems" id="0">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-					</object>
-				</object>
-				<string key="NSWindowContentMaxSize">{265, 159}</string>
-				<string key="NSWindowContentMinSize">{265, 159}</string>
-				<object class="NSView" key="NSWindowView" id="369507901">
-					<reference key="NSNextResponder"/>
-					<int key="NSvFlags">274</int>
-					<object class="NSMutableArray" key="NSSubviews">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSTabView" id="564742342">
+						<object class="NSTabView" id="247568729">
 							<reference key="NSNextResponder" ref="369507901"/>
-							<int key="NSvFlags">12</int>
-							<string key="NSFrameSize">{265, 159}</string>
+							<int key="NSvFlags">18</int>
+							<string key="NSFrame">{{147, 37}, {265, 211}}</string>
 							<reference key="NSSuperview" ref="369507901"/>
-							<reference key="NSNextKeyView" ref="865103585"/>
+							<reference key="NSWindow"/>
+							<reference key="NSNextKeyView" ref="646624756"/>
+							<string key="NSReuseIdentifierKey">_NS:608</string>
 							<object class="NSMutableArray" key="NSTabViewItems">
 								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSTabViewItem" id="874188166">
-									<string key="NSIdentifier">0</string>
-									<object class="NSView" key="NSView" id="865103585">
-										<reference key="NSNextResponder" ref="564742342"/>
-										<int key="NSvFlags">274</int>
+								<object class="NSTabViewItem" id="277431414">
+									<string key="NSIdentifier">1</string>
+									<object class="NSView" key="NSView" id="646624756">
+										<reference key="NSNextResponder" ref="247568729"/>
+										<int key="NSvFlags">256</int>
 										<object class="NSMutableArray" key="NSSubviews">
 											<bool key="EncodedWithXMLCoder">YES</bool>
-											<object class="NSTextField" id="883219248">
-												<reference key="NSNextResponder" ref="865103585"/>
+											<object class="NSTextField" id="1055886655">
+												<reference key="NSNextResponder" ref="646624756"/>
 												<int key="NSvFlags">268</int>
-												<string key="NSFrame">{{12, 116}, {83, 14}}</string>
-												<reference key="NSSuperview" ref="865103585"/>
-												<reference key="NSNextKeyView" ref="193312849"/>
+												<string key="NSFrame">{{14, 145}, {41, 14}}</string>
+												<reference key="NSSuperview" ref="646624756"/>
+												<reference key="NSWindow"/>
+												<reference key="NSNextKeyView" ref="96425952"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="899323867">
+												<object class="NSTextFieldCell" key="NSCell" id="9695847">
 													<int key="NSCellFlags">68288064</int>
 													<int key="NSCellFlags2">71304192</int>
-													<string key="NSContents">Sync pithos to:</string>
-													<object class="NSFont" key="NSSupport" id="26">
-														<string key="NSName">LucidaGrande</string>
-														<double key="NSSize">11</double>
-														<int key="NSfFlags">3100</int>
-													</object>
-													<reference key="NSControlView" ref="883219248"/>
+													<string key="NSContents">Server:</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="1055886655"/>
 													<bool key="NSDrawsBackground">YES</bool>
 													<object class="NSColor" key="NSBackgroundColor" id="820783553">
 														<int key="NSColorSpace">6</int>
 														<string key="NSCatalogName">System</string>
 														<string key="NSColorName">controlColor</string>
-														<object class="NSColor" key="NSColor" id="6151139">
-															<int key="NSColorSpace">3</int>
-															<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
-														</object>
+														<reference key="NSColor" ref="6151139"/>
 													</object>
-													<object class="NSColor" key="NSTextColor" id="44104873">
+													<reference key="NSTextColor" ref="44104873"/>
+												</object>
+											</object>
+											<object class="NSTextField" id="96425952">
+												<reference key="NSNextResponder" ref="646624756"/>
+												<int key="NSvFlags">266</int>
+												<string key="NSFrame">{{60, 143}, {168, 19}}</string>
+												<reference key="NSSuperview" ref="646624756"/>
+												<reference key="NSWindow"/>
+												<reference key="NSNextKeyView" ref="571994001"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="34677607">
+													<int key="NSCellFlags">-1804468671</int>
+													<int key="NSCellFlags2">272761920</int>
+													<string key="NSContents"/>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="96425952"/>
+													<bool key="NSDrawsBackground">YES</bool>
+													<object class="NSColor" key="NSBackgroundColor" id="1019997203">
 														<int key="NSColorSpace">6</int>
 														<string key="NSCatalogName">System</string>
-														<string key="NSColorName">controlTextColor</string>
-														<object class="NSColor" key="NSColor" id="960107716">
-															<int key="NSColorSpace">3</int>
-															<bytes key="NSWhite">MAA</bytes>
-														</object>
+														<string key="NSColorName">textBackgroundColor</string>
+														<reference key="NSColor" ref="712919987"/>
+													</object>
+													<object class="NSColor" key="NSTextColor" id="971696100">
+														<int key="NSColorSpace">6</int>
+														<string key="NSCatalogName">System</string>
+														<string key="NSColorName">textColor</string>
+														<reference key="NSColor" ref="960107716"/>
 													</object>
 												</object>
 											</object>
+											<object class="NSTextField" id="287579732">
+												<reference key="NSNextResponder" ref="646624756"/>
+												<int key="NSvFlags">266</int>
+												<string key="NSFrame">{{60, 85}, {168, 19}}</string>
+												<reference key="NSSuperview" ref="646624756"/>
+												<reference key="NSWindow"/>
+												<reference key="NSNextKeyView" ref="1017221490"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="1001750419">
+													<int key="NSCellFlags">-1267597759</int>
+													<int key="NSCellFlags2">272761920</int>
+													<string key="NSContents"/>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="287579732"/>
+													<bool key="NSDrawsBackground">YES</bool>
+													<reference key="NSBackgroundColor" ref="1019997203"/>
+													<reference key="NSTextColor" ref="971696100"/>
+												</object>
+											</object>
+											<object class="NSTextField" id="773004803">
+												<reference key="NSNextResponder" ref="646624756"/>
+												<int key="NSvFlags">266</int>
+												<string key="NSFrame">{{60, 58}, {168, 19}}</string>
+												<reference key="NSSuperview" ref="646624756"/>
+												<reference key="NSWindow"/>
+												<reference key="NSNextKeyView" ref="666198740"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="350801514">
+													<int key="NSCellFlags">-1267597759</int>
+													<int key="NSCellFlags2">272761920</int>
+													<string key="NSContents"/>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="773004803"/>
+													<bool key="NSDrawsBackground">YES</bool>
+													<reference key="NSBackgroundColor" ref="1019997203"/>
+													<reference key="NSTextColor" ref="971696100"/>
+												</object>
+											</object>
 											<object class="NSTextField" id="507142965">
-												<reference key="NSNextResponder" ref="865103585"/>
+												<reference key="NSNextResponder" ref="646624756"/>
 												<int key="NSvFlags">268</int>
-												<string key="NSFrame">{{12, 62}, {64, 14}}</string>
-												<reference key="NSSuperview" ref="865103585"/>
-												<reference key="NSNextKeyView" ref="379730869"/>
+												<string key="NSFrame">{{14, 87}, {41, 14}}</string>
+												<reference key="NSSuperview" ref="646624756"/>
+												<reference key="NSWindow"/>
+												<reference key="NSNextKeyView" ref="287579732"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSTextFieldCell" key="NSCell" id="993321662">
 													<int key="NSCellFlags">68288064</int>
@@ -219,11 +382,12 @@
 												</object>
 											</object>
 											<object class="NSTextField" id="1017221490">
-												<reference key="NSNextResponder" ref="865103585"/>
+												<reference key="NSNextResponder" ref="646624756"/>
 												<int key="NSvFlags">268</int>
-												<string key="NSFrame">{{12, 41}, {64, 14}}</string>
-												<reference key="NSSuperview" ref="865103585"/>
-												<reference key="NSNextKeyView" ref="682758465"/>
+												<string key="NSFrame">{{14, 60}, {41, 14}}</string>
+												<reference key="NSSuperview" ref="646624756"/>
+												<reference key="NSWindow"/>
+												<reference key="NSNextKeyView" ref="773004803"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSTextFieldCell" key="NSCell" id="1037784646">
 													<int key="NSCellFlags">68288064</int>
@@ -237,10 +401,11 @@
 												</object>
 											</object>
 											<object class="NSTextField" id="992895966">
-												<reference key="NSNextResponder" ref="865103585"/>
+												<reference key="NSNextResponder" ref="646624756"/>
 												<int key="NSvFlags">268</int>
-												<string key="NSFrame">{{7, 84}, {86, 14}}</string>
-												<reference key="NSSuperview" ref="865103585"/>
+												<string key="NSFrame">{{14, 112}, {86, 14}}</string>
+												<reference key="NSSuperview" ref="646624756"/>
+												<reference key="NSWindow"/>
 												<reference key="NSNextKeyView" ref="507142965"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSTextFieldCell" key="NSCell" id="784421446">
@@ -254,49 +419,20 @@
 													<reference key="NSTextColor" ref="44104873"/>
 												</object>
 											</object>
-											<object class="NSTextField" id="1054241470">
-												<reference key="NSNextResponder" ref="865103585"/>
-												<int key="NSvFlags">268</int>
-												<string key="NSFrame">{{7, 138}, {49, 14}}</string>
-												<reference key="NSSuperview" ref="865103585"/>
-												<reference key="NSNextKeyView" ref="883219248"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="482751693">
-													<int key="NSCellFlags">68288064</int>
-													<int key="NSCellFlags2">4195328</int>
-													<string key="NSContents">Syncing:</string>
-													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="1054241470"/>
-													<bool key="NSDrawsBackground">YES</bool>
-													<reference key="NSBackgroundColor" ref="820783553"/>
-													<reference key="NSTextColor" ref="44104873"/>
-												</object>
-											</object>
-											<object class="NSBox" id="701502029">
-												<reference key="NSNextResponder" ref="865103585"/>
+											<object class="NSBox" id="571994001">
+												<reference key="NSNextResponder" ref="646624756"/>
 												<int key="NSvFlags">-2147483634</int>
-												<string key="NSFrame">{{0, 99}, {265, 5}}</string>
-												<reference key="NSSuperview" ref="865103585"/>
+												<string key="NSFrame">{{-3, 132}, {251, 5}}</string>
+												<reference key="NSSuperview" ref="646624756"/>
+												<reference key="NSWindow"/>
 												<reference key="NSNextKeyView" ref="992895966"/>
 												<string key="NSOffsets">{0, 0}</string>
 												<object class="NSTextFieldCell" key="NSTitleCell">
 													<int key="NSCellFlags">67239424</int>
 													<int key="NSCellFlags2">0</int>
 													<string key="NSContents">Box</string>
-													<object class="NSFont" key="NSSupport" id="271467070">
-														<string key="NSName">LucidaGrande</string>
-														<double key="NSSize">13</double>
-														<int key="NSfFlags">1044</int>
-													</object>
-													<object class="NSColor" key="NSBackgroundColor" id="1019997203">
-														<int key="NSColorSpace">6</int>
-														<string key="NSCatalogName">System</string>
-														<string key="NSColorName">textBackgroundColor</string>
-														<object class="NSColor" key="NSColor" id="712919987">
-															<int key="NSColorSpace">3</int>
-															<bytes key="NSWhite">MQA</bytes>
-														</object>
-													</object>
+													<reference key="NSSupport" ref="271467070"/>
+													<reference key="NSBackgroundColor" ref="1019997203"/>
 													<object class="NSColor" key="NSTextColor">
 														<int key="NSColorSpace">3</int>
 														<bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes>
@@ -307,45 +443,52 @@
 												<int key="NSTitlePosition">0</int>
 												<bool key="NSTransparent">NO</bool>
 											</object>
-											<object class="NSBox" id="338834025">
-												<reference key="NSNextResponder" ref="865103585"/>
-												<int key="NSvFlags">-2147483634</int>
-												<string key="NSFrame">{{0, 23}, {265, 5}}</string>
-												<reference key="NSSuperview" ref="865103585"/>
-												<reference key="NSNextKeyView" ref="892129196"/>
-												<string key="NSOffsets">{0, 0}</string>
-												<object class="NSTextFieldCell" key="NSTitleCell">
+											<object class="NSButton" id="666198740">
+												<reference key="NSNextResponder" ref="646624756"/>
+												<int key="NSvFlags">268</int>
+												<string key="NSFrame">{{57, 34}, {63, 18}}</string>
+												<reference key="NSSuperview" ref="646624756"/>
+												<reference key="NSWindow"/>
+												<reference key="NSNextKeyView" ref="764785507"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="269907300">
 													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">0</int>
-													<string key="NSContents">Box</string>
-													<reference key="NSSupport" ref="271467070"/>
-													<reference key="NSBackgroundColor" ref="1019997203"/>
-													<object class="NSColor" key="NSTextColor">
-														<int key="NSColorSpace">3</int>
-														<bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes>
+													<int key="NSCellFlags2">131072</int>
+													<string key="NSContents">Manual</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="666198740"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<object class="NSCustomResource" key="NSNormalImage" id="342586661">
+														<string key="NSClassName">NSImage</string>
+														<string key="NSResourceName">NSSwitch</string>
 													</object>
+													<object class="NSButtonImageSource" key="NSAlternateImage" id="996787193">
+														<string key="NSImageName">NSSwitch</string>
+													</object>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
 												</object>
-												<int key="NSBorderType">3</int>
-												<int key="NSBoxType">2</int>
-												<int key="NSTitlePosition">0</int>
-												<bool key="NSTransparent">NO</bool>
 											</object>
-											<object class="NSButton" id="852692720">
-												<reference key="NSNextResponder" ref="865103585"/>
+											<object class="NSButton" id="750494034">
+												<reference key="NSNextResponder" ref="646624756"/>
 												<int key="NSvFlags">289</int>
-												<string key="NSFrame">{{188, 2}, {72, 28}}</string>
-												<reference key="NSSuperview" ref="865103585"/>
+												<string key="NSFrame">{{161, 4}, {72, 28}}</string>
+												<reference key="NSSuperview" ref="646624756"/>
+												<reference key="NSWindow"/>
 												<reference key="NSNextKeyView"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="1023707124">
+												<object class="NSButtonCell" key="NSCell" id="950873176">
 													<int key="NSCellFlags">-2080244224</int>
 													<int key="NSCellFlags2">134348800</int>
 													<string key="NSContents">Login</string>
 													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="852692720"/>
+													<reference key="NSControlView" ref="750494034"/>
 													<int key="NSButtonFlags">-2034876161</int>
 													<int key="NSButtonFlags2">129</int>
-													<object class="NSFont" key="NSAlternateImage" id="43181375">
+													<object class="NSFont" key="NSAlternateImage" id="553785584">
 														<string key="NSName">LucidaGrande</string>
 														<double key="NSSize">11</double>
 														<int key="NSfFlags">16</int>
@@ -356,78 +499,50 @@
 													<int key="NSPeriodicInterval">75</int>
 												</object>
 											</object>
-											<object class="NSTextField" id="379730869">
-												<reference key="NSNextResponder" ref="865103585"/>
-												<int key="NSvFlags">270</int>
-												<string key="NSFrame">{{81, 60}, {174, 19}}</string>
-												<reference key="NSSuperview" ref="865103585"/>
-												<reference key="NSNextKeyView" ref="1017221490"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="1043934785">
-													<int key="NSCellFlags">-1267597759</int>
-													<int key="NSCellFlags2">272761856</int>
-													<string key="NSContents"/>
-													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="379730869"/>
-													<bool key="NSDrawsBackground">YES</bool>
-													<reference key="NSBackgroundColor" ref="1019997203"/>
-													<object class="NSColor" key="NSTextColor" id="971696100">
-														<int key="NSColorSpace">6</int>
-														<string key="NSCatalogName">System</string>
-														<string key="NSColorName">textColor</string>
-														<reference key="NSColor" ref="960107716"/>
-													</object>
-												</object>
-											</object>
-											<object class="NSTextField" id="682758465">
-												<reference key="NSNextResponder" ref="865103585"/>
-												<int key="NSvFlags">270</int>
-												<string key="NSFrame">{{81, 39}, {174, 19}}</string>
-												<reference key="NSSuperview" ref="865103585"/>
-												<reference key="NSNextKeyView" ref="338834025"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="1042008644">
-													<int key="NSCellFlags">-1267597759</int>
-													<int key="NSCellFlags2">272761856</int>
-													<string key="NSContents"/>
-													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="682758465"/>
-													<bool key="NSDrawsBackground">YES</bool>
-													<reference key="NSBackgroundColor" ref="1019997203"/>
-													<reference key="NSTextColor" ref="971696100"/>
-												</object>
-											</object>
-											<object class="NSButton" id="892129196">
-												<reference key="NSNextResponder" ref="865103585"/>
-												<int key="NSvFlags">268</int>
-												<string key="NSFrame">{{78, 19}, {63, 18}}</string>
-												<reference key="NSSuperview" ref="865103585"/>
-												<reference key="NSNextKeyView" ref="852692720"/>
+											<object class="NSButton" id="764785507">
+												<reference key="NSNextResponder" ref="646624756"/>
+												<int key="NSvFlags">289</int>
+												<string key="NSFrame">{{91, 4}, {72, 28}}</string>
+												<reference key="NSSuperview" ref="646624756"/>
+												<reference key="NSWindow"/>
+												<reference key="NSNextKeyView" ref="750494034"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="429867337">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">131072</int>
-													<string key="NSContents">Manual</string>
+												<object class="NSButtonCell" key="NSCell" id="327493266">
+													<int key="NSCellFlags">-2080244224</int>
+													<int key="NSCellFlags2">134348800</int>
+													<string key="NSContents">Cancel</string>
 													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="892129196"/>
-													<int key="NSButtonFlags">1211912703</int>
-													<int key="NSButtonFlags2">2</int>
-													<object class="NSCustomResource" key="NSNormalImage">
-														<string key="NSClassName">NSImage</string>
-														<string key="NSResourceName">NSSwitch</string>
-													</object>
-													<object class="NSButtonImageSource" key="NSAlternateImage">
-														<string key="NSImageName">NSSwitch</string>
-													</object>
+													<reference key="NSControlView" ref="764785507"/>
+													<int key="NSButtonFlags">-2034876161</int>
+													<int key="NSButtonFlags2">129</int>
+													<reference key="NSAlternateImage" ref="553785584"/>
 													<string key="NSAlternateContents"/>
-													<string key="NSKeyEquivalent"/>
-													<int key="NSPeriodicDelay">200</int>
-													<int key="NSPeriodicInterval">25</int>
+													<string type="base64-UTF8" key="NSKeyEquivalent">Gw</string>
+													<int key="NSPeriodicDelay">400</int>
+													<int key="NSPeriodicInterval">75</int>
 												</object>
 											</object>
-											<object class="NSPathControl" id="193312849">
-												<reference key="NSNextResponder" ref="865103585"/>
-												<int key="NSvFlags">268</int>
+										</object>
+										<string key="NSFrame">{{10, 33}, {245, 165}}</string>
+										<reference key="NSSuperview" ref="247568729"/>
+										<reference key="NSWindow"/>
+										<reference key="NSNextKeyView" ref="1055886655"/>
+										<string key="NSReuseIdentifierKey">_NS:610</string>
+									</object>
+									<string key="NSLabel">Info</string>
+									<reference key="NSColor" ref="820783553"/>
+									<reference key="NSTabView" ref="247568729"/>
+								</object>
+								<object class="NSTabViewItem" id="775611844">
+									<string key="NSIdentifier">2</string>
+									<object class="NSView" key="NSView" id="689284120">
+										<nil key="NSNextResponder"/>
+										<int key="NSvFlags">256</int>
+										<object class="NSMutableArray" key="NSSubviews">
+											<bool key="EncodedWithXMLCoder">YES</bool>
+											<object class="NSPathControl" id="312807152">
+												<reference key="NSNextResponder" ref="689284120"/>
+												<int key="NSvFlags">266</int>
 												<object class="NSMutableSet" key="NSDragTypes">
 													<bool key="EncodedWithXMLCoder">YES</bool>
 													<object class="NSArray" key="set.sortedObjects">
@@ -436,11 +551,11 @@
 														<string>NSFilenamesPboardType</string>
 													</object>
 												</object>
-												<string key="NSFrame">{{97, 110}, {161, 22}}</string>
-												<reference key="NSSuperview" ref="865103585"/>
-												<reference key="NSNextKeyView" ref="701502029"/>
+												<string key="NSFrame">{{62, 141}, {169, 22}}</string>
+												<reference key="NSSuperview" ref="689284120"/>
+												<reference key="NSNextKeyView" ref="893175748"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSPathCell" key="NSCell" id="238772973">
+												<object class="NSPathCell" key="NSCell" id="729917413">
 													<int key="NSCellFlags">337772033</int>
 													<int key="NSCellFlags2">131072</int>
 													<object class="NSURL" key="NSContents">
@@ -448,7 +563,7 @@
 														<string key="NS.relative">file://localhost/</string>
 													</object>
 													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="193312849"/>
+													<reference key="NSControlView" ref="312807152"/>
 													<object class="NSMutableArray" key="NSPathComponentCells">
 														<bool key="EncodedWithXMLCoder">YES</bool>
 														<object class="NSPathComponentCell">
@@ -477,104 +592,146 @@
 														</object>
 													</object>
 													<int key="NSPathStyle">2</int>
-													<reference key="NSDelegate" ref="193312849"/>
+													<reference key="NSDelegate" ref="312807152"/>
+													<object class="NSArray" key="NSAllowedTypes" id="22221536">
+														<bool key="EncodedWithXMLCoder">YES</bool>
+														<string>public.folder</string>
+													</object>
 												</object>
 											</object>
-										</object>
-										<string key="NSFrameSize">{265, 159}</string>
-										<reference key="NSSuperview" ref="564742342"/>
-										<reference key="NSNextKeyView" ref="1054241470"/>
-									</object>
-									<string key="NSLabel">General</string>
-									<reference key="NSColor" ref="820783553"/>
-									<reference key="NSTabView" ref="564742342"/>
-								</object>
-								<object class="NSTabViewItem" id="939681372">
-									<string key="NSIdentifier">1</string>
-									<object class="NSView" key="NSView" id="646652655">
-										<nil key="NSNextResponder"/>
-										<int key="NSvFlags">274</int>
-										<object class="NSMutableArray" key="NSSubviews">
-											<bool key="EncodedWithXMLCoder">YES</bool>
-											<object class="NSButton" id="724709226">
-												<reference key="NSNextResponder" ref="646652655"/>
-												<int key="NSvFlags">292</int>
-												<string key="NSFrame">{{5, 2}, {72, 28}}</string>
-												<reference key="NSSuperview" ref="646652655"/>
-												<reference key="NSNextKeyView" ref="131074952"/>
+											<object class="NSTextField" id="245911804">
+												<reference key="NSNextResponder" ref="689284120"/>
+												<int key="NSvFlags">268</int>
+												<string key="NSFrame">{{14, 145}, {46, 14}}</string>
+												<reference key="NSSuperview" ref="689284120"/>
+												<reference key="NSNextKeyView" ref="312807152"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="708090355">
+													<int key="NSCellFlags">68288064</int>
+													<int key="NSCellFlags2">71304192</int>
+													<string key="NSContents">Sync to:</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="245911804"/>
+													<bool key="NSDrawsBackground">YES</bool>
+													<reference key="NSBackgroundColor" ref="820783553"/>
+													<reference key="NSTextColor" ref="44104873"/>
+												</object>
+											</object>
+											<object class="NSButton" id="430121568">
+												<reference key="NSNextResponder" ref="689284120"/>
+												<int key="NSvFlags">289</int>
+												<string key="NSFrame">{{161, 4}, {72, 28}}</string>
+												<reference key="NSSuperview" ref="689284120"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="992763544">
+												<object class="NSButtonCell" key="NSCell" id="592322209">
 													<int key="NSCellFlags">-2080244224</int>
 													<int key="NSCellFlags2">134348800</int>
-													<string key="NSContents">Revert</string>
+													<string key="NSContents">Apply</string>
 													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="724709226"/>
-													<int key="NSButtonFlags">-2038021889</int>
+													<reference key="NSControlView" ref="430121568"/>
+													<int key="NSButtonFlags">-2034876161</int>
 													<int key="NSButtonFlags2">129</int>
-													<reference key="NSAlternateImage" ref="26"/>
+													<reference key="NSAlternateImage" ref="553785584"/>
 													<string key="NSAlternateContents"/>
 													<string key="NSKeyEquivalent"/>
 													<int key="NSPeriodicDelay">400</int>
 													<int key="NSPeriodicInterval">75</int>
 												</object>
 											</object>
-											<object class="NSButton" id="131074952">
-												<reference key="NSNextResponder" ref="646652655"/>
+											<object class="NSButton" id="915820146">
+												<reference key="NSNextResponder" ref="689284120"/>
 												<int key="NSvFlags">289</int>
-												<string key="NSFrame">{{188, 2}, {72, 28}}</string>
-												<reference key="NSSuperview" ref="646652655"/>
-												<reference key="NSNextKeyView" ref="564742342"/>
+												<string key="NSFrame">{{91, 4}, {72, 28}}</string>
+												<reference key="NSSuperview" ref="689284120"/>
+												<reference key="NSNextKeyView" ref="430121568"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="500680497">
+												<object class="NSButtonCell" key="NSCell" id="929820714">
 													<int key="NSCellFlags">-2080244224</int>
 													<int key="NSCellFlags2">134348800</int>
-													<string key="NSContents">Apply</string>
+													<string key="NSContents">Cancel</string>
 													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="131074952"/>
+													<reference key="NSControlView" ref="915820146"/>
 													<int key="NSButtonFlags">-2034876161</int>
 													<int key="NSButtonFlags2">129</int>
-													<reference key="NSAlternateImage" ref="43181375"/>
+													<reference key="NSAlternateImage" ref="553785584"/>
 													<string key="NSAlternateContents"/>
-													<string key="NSKeyEquivalent"/>
+													<string type="base64-UTF8" key="NSKeyEquivalent">Gw</string>
 													<int key="NSPeriodicDelay">400</int>
 													<int key="NSPeriodicInterval">75</int>
 												</object>
 											</object>
-											<object class="NSScrollView" id="729122555">
-												<reference key="NSNextResponder" ref="646652655"/>
-												<int key="NSvFlags">4374</int>
-												<object class="NSMutableArray" key="NSSubviews">
-													<bool key="EncodedWithXMLCoder">YES</bool>
-													<object class="NSClipView" id="488621520">
-														<reference key="NSNextResponder" ref="729122555"/>
-														<int key="NSvFlags">2304</int>
-														<object class="NSMutableArray" key="NSSubviews">
-															<bool key="EncodedWithXMLCoder">YES</bool>
-															<object class="NSTableView" id="30388460">
-																<reference key="NSNextResponder" ref="488621520"/>
-																<int key="NSvFlags">4352</int>
-																<string key="NSFrameSize">{120, 78}</string>
-																<reference key="NSSuperview" ref="488621520"/>
-																<reference key="NSNextKeyView" ref="27951958"/>
-																<bool key="NSEnabled">YES</bool>
-																<object class="NSTableHeaderView" key="NSHeaderView" id="750592955">
-																	<reference key="NSNextResponder" ref="177329431"/>
-																	<int key="NSvFlags">256</int>
+											<object class="NSButton" id="893175748">
+												<reference key="NSNextResponder" ref="689284120"/>
+												<int key="NSvFlags">268</int>
+												<string key="NSFrame">{{26, 121}, {63, 18}}</string>
+												<reference key="NSSuperview" ref="689284120"/>
+												<reference key="NSNextKeyView" ref="915820146"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="768549799">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">131072</int>
+													<string key="NSContents">Active</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="893175748"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSNormalImage" ref="342586661"/>
+													<reference key="NSAlternateImage" ref="996787193"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
+											</object>
+										</object>
+										<string key="NSFrame">{{10, 33}, {245, 165}}</string>
+										<reference key="NSNextKeyView" ref="245911804"/>
+										<string key="NSReuseIdentifierKey">_NS:620</string>
+									</object>
+									<string key="NSLabel">Sync</string>
+									<reference key="NSColor" ref="820783553"/>
+									<reference key="NSTabView" ref="247568729"/>
+								</object>
+								<object class="NSTabViewItem" id="239927411">
+									<string key="NSIdentifier">3</string>
+									<object class="NSView" key="NSView" id="635100516">
+										<nil key="NSNextResponder"/>
+										<int key="NSvFlags">256</int>
+										<object class="NSMutableArray" key="NSSubviews">
+											<bool key="EncodedWithXMLCoder">YES</bool>
+											<object class="NSScrollView" id="427907042">
+												<reference key="NSNextResponder" ref="635100516"/>
+												<int key="NSvFlags">4374</int>
+												<object class="NSMutableArray" key="NSSubviews">
+													<bool key="EncodedWithXMLCoder">YES</bool>
+													<object class="NSClipView" id="748581994">
+														<reference key="NSNextResponder" ref="427907042"/>
+														<int key="NSvFlags">2304</int>
+														<object class="NSMutableArray" key="NSSubviews">
+															<bool key="EncodedWithXMLCoder">YES</bool>
+															<object class="NSTableView" id="199904301">
+																<reference key="NSNextResponder" ref="748581994"/>
+																<int key="NSvFlags">4352</int>
+																<string key="NSFrameSize">{120, 78}</string>
+																<reference key="NSSuperview" ref="748581994"/>
+																<reference key="NSNextKeyView" ref="881351662"/>
+																<bool key="NSEnabled">YES</bool>
+																<object class="NSTableHeaderView" key="NSHeaderView" id="94922151">
+																	<reference key="NSNextResponder" ref="5455797"/>
+																	<int key="NSvFlags">256</int>
 																	<string key="NSFrameSize">{120, 17}</string>
-																	<reference key="NSSuperview" ref="177329431"/>
-																	<reference key="NSNextKeyView" ref="958839404"/>
-																	<reference key="NSTableView" ref="30388460"/>
+																	<reference key="NSSuperview" ref="5455797"/>
+																	<reference key="NSNextKeyView" ref="748581994"/>
+																	<reference key="NSTableView" ref="199904301"/>
 																</object>
-																<object class="_NSCornerView" key="NSCornerView" id="958839404">
-																	<reference key="NSNextResponder" ref="729122555"/>
+																<object class="_NSCornerView" key="NSCornerView">
+																	<nil key="NSNextResponder"/>
 																	<int key="NSvFlags">-2147483392</int>
 																	<string key="NSFrame">{{224, 0}, {16, 17}}</string>
-																	<reference key="NSSuperview" ref="729122555"/>
-																	<reference key="NSNextKeyView" ref="488621520"/>
 																</object>
 																<object class="NSMutableArray" key="NSTableColumns">
 																	<bool key="EncodedWithXMLCoder">YES</bool>
-																	<object class="NSTableColumn" id="801247121">
+																	<object class="NSTableColumn" id="586867411">
 																		<double key="NSWidth">117</double>
 																		<double key="NSMinWidth">40</double>
 																		<double key="NSMaxWidth">1000</double>
@@ -587,47 +744,29 @@
 																				<int key="NSColorSpace">3</int>
 																				<bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes>
 																			</object>
-																			<object class="NSColor" key="NSTextColor" id="479902038">
-																				<int key="NSColorSpace">6</int>
-																				<string key="NSCatalogName">System</string>
-																				<string key="NSColorName">headerTextColor</string>
-																				<reference key="NSColor" ref="960107716"/>
-																			</object>
+																			<reference key="NSTextColor" ref="60462442"/>
 																		</object>
-																		<object class="NSTextFieldCell" key="NSDataCell" id="410705345">
+																		<object class="NSTextFieldCell" key="NSDataCell" id="233862147">
 																			<int key="NSCellFlags">337772096</int>
 																			<int key="NSCellFlags2">2048</int>
 																			<string key="NSContents">Text Cell</string>
 																			<reference key="NSSupport" ref="26"/>
-																			<reference key="NSControlView" ref="30388460"/>
-																			<object class="NSColor" key="NSBackgroundColor" id="512560731">
-																				<int key="NSColorSpace">6</int>
-																				<string key="NSCatalogName">System</string>
-																				<string key="NSColorName">controlBackgroundColor</string>
-																				<reference key="NSColor" ref="6151139"/>
-																			</object>
+																			<reference key="NSControlView" ref="199904301"/>
+																			<reference key="NSBackgroundColor" ref="512560731"/>
 																			<reference key="NSTextColor" ref="44104873"/>
 																		</object>
 																		<int key="NSResizingMask">3</int>
 																		<bool key="NSIsResizeable">YES</bool>
 																		<bool key="NSIsEditable">YES</bool>
-																		<reference key="NSTableView" ref="30388460"/>
+																		<reference key="NSTableView" ref="199904301"/>
 																	</object>
 																</object>
 																<double key="NSIntercellSpacingWidth">3</double>
 																<double key="NSIntercellSpacingHeight">2</double>
 																<reference key="NSBackgroundColor" ref="712919987"/>
-																<object class="NSColor" key="NSGridColor" id="1027158800">
-																	<int key="NSColorSpace">6</int>
-																	<string key="NSCatalogName">System</string>
-																	<string key="NSColorName">gridColor</string>
-																	<object class="NSColor" key="NSColor">
-																		<int key="NSColorSpace">3</int>
-																		<bytes key="NSWhite">MC41AA</bytes>
-																	</object>
-																</object>
+																<reference key="NSGridColor" ref="1055172989"/>
 																<double key="NSRowHeight">17</double>
-																<int key="NSTvFlags">1388314624</int>
+																<int key="NSTvFlags">1925185536</int>
 																<reference key="NSDelegate"/>
 																<reference key="NSDataSource"/>
 																<int key="NSGridStyleMask">1</int>
@@ -636,98 +775,95 @@
 																<int key="NSDraggingSourceMaskForNonLocal">0</int>
 																<bool key="NSAllowsTypeSelect">YES</bool>
 																<int key="NSTableViewDraggingDestinationStyle">0</int>
+																<int key="NSTableViewGroupRowStyle">1</int>
 															</object>
 														</object>
 														<string key="NSFrame">{{1, 17}, {120, 78}}</string>
-														<reference key="NSSuperview" ref="729122555"/>
-														<reference key="NSNextKeyView" ref="30388460"/>
-														<reference key="NSDocView" ref="30388460"/>
+														<reference key="NSSuperview" ref="427907042"/>
+														<reference key="NSNextKeyView" ref="199904301"/>
+														<reference key="NSDocView" ref="199904301"/>
 														<reference key="NSBGColor" ref="512560731"/>
 														<int key="NScvFlags">4</int>
 													</object>
-													<object class="NSScroller" id="27951958">
-														<reference key="NSNextResponder" ref="729122555"/>
+													<object class="NSScroller" id="881351662">
+														<reference key="NSNextResponder" ref="427907042"/>
 														<int key="NSvFlags">-2147483392</int>
 														<string key="NSFrame">{{-100, -100}, {15, 102}}</string>
-														<reference key="NSSuperview" ref="729122555"/>
-														<reference key="NSNextKeyView" ref="177329431"/>
-														<reference key="NSTarget" ref="729122555"/>
+														<reference key="NSSuperview" ref="427907042"/>
+														<reference key="NSNextKeyView" ref="5455797"/>
+														<reference key="NSTarget" ref="427907042"/>
 														<string key="NSAction">_doScroller:</string>
 														<double key="NSPercent">0.80769230769230771</double>
 													</object>
-													<object class="NSScroller" id="541110138">
-														<reference key="NSNextResponder" ref="729122555"/>
+													<object class="NSScroller" id="613407224">
+														<reference key="NSNextResponder" ref="427907042"/>
 														<int key="NSvFlags">-2147483392</int>
 														<string key="NSFrame">{{1, 119}, {223, 15}}</string>
-														<reference key="NSSuperview" ref="729122555"/>
-														<reference key="NSNextKeyView" ref="202050240"/>
+														<reference key="NSSuperview" ref="427907042"/>
+														<reference key="NSNextKeyView" ref="377785255"/>
 														<int key="NSsFlags">1</int>
-														<reference key="NSTarget" ref="729122555"/>
+														<reference key="NSTarget" ref="427907042"/>
 														<string key="NSAction">_doScroller:</string>
 														<double key="NSPercent">0.97590361445783136</double>
 													</object>
-													<object class="NSClipView" id="177329431">
-														<reference key="NSNextResponder" ref="729122555"/>
+													<object class="NSClipView" id="5455797">
+														<reference key="NSNextResponder" ref="427907042"/>
 														<int key="NSvFlags">2304</int>
 														<object class="NSMutableArray" key="NSSubviews">
 															<bool key="EncodedWithXMLCoder">YES</bool>
-															<reference ref="750592955"/>
+															<reference ref="94922151"/>
 														</object>
 														<string key="NSFrame">{{1, 0}, {120, 17}}</string>
-														<reference key="NSSuperview" ref="729122555"/>
-														<reference key="NSNextKeyView" ref="750592955"/>
-														<reference key="NSDocView" ref="750592955"/>
+														<reference key="NSSuperview" ref="427907042"/>
+														<reference key="NSNextKeyView" ref="94922151"/>
+														<reference key="NSDocView" ref="94922151"/>
 														<reference key="NSBGColor" ref="512560731"/>
 														<int key="NScvFlags">4</int>
 													</object>
-													<reference ref="958839404"/>
 												</object>
-												<string key="NSFrame">{{10, 53}, {122, 96}}</string>
-												<reference key="NSSuperview" ref="646652655"/>
-												<reference key="NSNextKeyView" ref="488621520"/>
-												<int key="NSsFlags">562</int>
-												<reference key="NSVScroller" ref="27951958"/>
-												<reference key="NSHScroller" ref="541110138"/>
-												<reference key="NSContentView" ref="488621520"/>
-												<reference key="NSHeaderClipView" ref="177329431"/>
-												<reference key="NSCornerView" ref="958839404"/>
+												<string key="NSFrame">{{0, 66}, {122, 96}}</string>
+												<reference key="NSSuperview" ref="635100516"/>
+												<reference key="NSNextKeyView" ref="748581994"/>
+												<int key="NSsFlags">133682</int>
+												<reference key="NSVScroller" ref="881351662"/>
+												<reference key="NSHScroller" ref="613407224"/>
+												<reference key="NSContentView" ref="748581994"/>
+												<reference key="NSHeaderClipView" ref="5455797"/>
 												<bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
 											</object>
-											<object class="NSScrollView" id="202050240">
-												<reference key="NSNextResponder" ref="646652655"/>
+											<object class="NSScrollView" id="377785255">
+												<reference key="NSNextResponder" ref="635100516"/>
 												<int key="NSvFlags">4371</int>
 												<object class="NSMutableArray" key="NSSubviews">
 													<bool key="EncodedWithXMLCoder">YES</bool>
-													<object class="NSClipView" id="219950644">
-														<reference key="NSNextResponder" ref="202050240"/>
+													<object class="NSClipView" id="441382477">
+														<reference key="NSNextResponder" ref="377785255"/>
 														<int key="NSvFlags">2304</int>
 														<object class="NSMutableArray" key="NSSubviews">
 															<bool key="EncodedWithXMLCoder">YES</bool>
-															<object class="NSTableView" id="955904863">
-																<reference key="NSNextResponder" ref="219950644"/>
+															<object class="NSTableView" id="801276999">
+																<reference key="NSNextResponder" ref="441382477"/>
 																<int key="NSvFlags">4352</int>
 																<string key="NSFrameSize">{120, 78}</string>
-																<reference key="NSSuperview" ref="219950644"/>
-																<reference key="NSNextKeyView" ref="817353191"/>
+																<reference key="NSSuperview" ref="441382477"/>
+																<reference key="NSNextKeyView" ref="176697034"/>
 																<bool key="NSEnabled">YES</bool>
-																<object class="NSTableHeaderView" key="NSHeaderView" id="917463045">
-																	<reference key="NSNextResponder" ref="342545830"/>
+																<object class="NSTableHeaderView" key="NSHeaderView" id="459733499">
+																	<reference key="NSNextResponder" ref="302523439"/>
 																	<int key="NSvFlags">256</int>
 																	<string key="NSFrameSize">{120, 17}</string>
-																	<reference key="NSSuperview" ref="342545830"/>
-																	<reference key="NSNextKeyView" ref="913709756"/>
-																	<reference key="NSTableView" ref="955904863"/>
+																	<reference key="NSSuperview" ref="302523439"/>
+																	<reference key="NSNextKeyView" ref="441382477"/>
+																	<reference key="NSTableView" ref="801276999"/>
 																</object>
-																<object class="_NSCornerView" key="NSCornerView" id="913709756">
-																	<reference key="NSNextResponder" ref="202050240"/>
+																<object class="_NSCornerView" key="NSCornerView">
+																	<nil key="NSNextResponder"/>
 																	<int key="NSvFlags">-2147483392</int>
 																	<string key="NSFrame">{{224, 0}, {16, 17}}</string>
-																	<reference key="NSSuperview" ref="202050240"/>
-																	<reference key="NSNextKeyView" ref="219950644"/>
 																</object>
 																<object class="NSMutableArray" key="NSTableColumns">
 																	<bool key="EncodedWithXMLCoder">YES</bool>
-																	<object class="NSTableColumn" id="604806618">
+																	<object class="NSTableColumn" id="158961369">
 																		<double key="NSWidth">117</double>
 																		<double key="NSMinWidth">40</double>
 																		<double key="NSMaxWidth">1000</double>
@@ -740,29 +876,29 @@
 																				<int key="NSColorSpace">3</int>
 																				<bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes>
 																			</object>
-																			<reference key="NSTextColor" ref="479902038"/>
+																			<reference key="NSTextColor" ref="60462442"/>
 																		</object>
-																		<object class="NSTextFieldCell" key="NSDataCell" id="809830821">
+																		<object class="NSTextFieldCell" key="NSDataCell" id="573751375">
 																			<int key="NSCellFlags">337772096</int>
 																			<int key="NSCellFlags2">2048</int>
 																			<string key="NSContents">Text Cell</string>
 																			<reference key="NSSupport" ref="26"/>
-																			<reference key="NSControlView" ref="955904863"/>
+																			<reference key="NSControlView" ref="801276999"/>
 																			<reference key="NSBackgroundColor" ref="512560731"/>
 																			<reference key="NSTextColor" ref="44104873"/>
 																		</object>
 																		<int key="NSResizingMask">3</int>
 																		<bool key="NSIsResizeable">YES</bool>
 																		<bool key="NSIsEditable">YES</bool>
-																		<reference key="NSTableView" ref="955904863"/>
+																		<reference key="NSTableView" ref="801276999"/>
 																	</object>
 																</object>
 																<double key="NSIntercellSpacingWidth">3</double>
 																<double key="NSIntercellSpacingHeight">2</double>
 																<reference key="NSBackgroundColor" ref="712919987"/>
-																<reference key="NSGridColor" ref="1027158800"/>
+																<reference key="NSGridColor" ref="1055172989"/>
 																<double key="NSRowHeight">17</double>
-																<int key="NSTvFlags">1388314624</int>
+																<int key="NSTvFlags">1925185536</int>
 																<reference key="NSDelegate"/>
 																<reference key="NSDataSource"/>
 																<int key="NSGridStyleMask">1</int>
@@ -771,79 +907,78 @@
 																<int key="NSDraggingSourceMaskForNonLocal">0</int>
 																<bool key="NSAllowsTypeSelect">YES</bool>
 																<int key="NSTableViewDraggingDestinationStyle">0</int>
+																<int key="NSTableViewGroupRowStyle">1</int>
 															</object>
 														</object>
 														<string key="NSFrame">{{1, 17}, {120, 78}}</string>
-														<reference key="NSSuperview" ref="202050240"/>
-														<reference key="NSNextKeyView" ref="955904863"/>
-														<reference key="NSDocView" ref="955904863"/>
+														<reference key="NSSuperview" ref="377785255"/>
+														<reference key="NSNextKeyView" ref="801276999"/>
+														<reference key="NSDocView" ref="801276999"/>
 														<reference key="NSBGColor" ref="512560731"/>
 														<int key="NScvFlags">4</int>
 													</object>
-													<object class="NSScroller" id="817353191">
-														<reference key="NSNextResponder" ref="202050240"/>
+													<object class="NSScroller" id="176697034">
+														<reference key="NSNextResponder" ref="377785255"/>
 														<int key="NSvFlags">-2147483392</int>
 														<string key="NSFrame">{{-100, -100}, {15, 102}}</string>
-														<reference key="NSSuperview" ref="202050240"/>
-														<reference key="NSNextKeyView" ref="342545830"/>
-														<reference key="NSTarget" ref="202050240"/>
+														<reference key="NSSuperview" ref="377785255"/>
+														<reference key="NSNextKeyView" ref="302523439"/>
+														<reference key="NSTarget" ref="377785255"/>
 														<string key="NSAction">_doScroller:</string>
 														<double key="NSPercent">0.80769230769230771</double>
 													</object>
-													<object class="NSScroller" id="529286880">
-														<reference key="NSNextResponder" ref="202050240"/>
+													<object class="NSScroller" id="79495429">
+														<reference key="NSNextResponder" ref="377785255"/>
 														<int key="NSvFlags">-2147483392</int>
 														<string key="NSFrame">{{1, 119}, {223, 15}}</string>
-														<reference key="NSSuperview" ref="202050240"/>
-														<reference key="NSNextKeyView" ref="988713632"/>
+														<reference key="NSSuperview" ref="377785255"/>
+														<reference key="NSNextKeyView" ref="152999980"/>
 														<int key="NSsFlags">1</int>
-														<reference key="NSTarget" ref="202050240"/>
+														<reference key="NSTarget" ref="377785255"/>
 														<string key="NSAction">_doScroller:</string>
 														<double key="NSPercent">0.97590361445783136</double>
 													</object>
-													<object class="NSClipView" id="342545830">
-														<reference key="NSNextResponder" ref="202050240"/>
+													<object class="NSClipView" id="302523439">
+														<reference key="NSNextResponder" ref="377785255"/>
 														<int key="NSvFlags">2304</int>
 														<object class="NSMutableArray" key="NSSubviews">
 															<bool key="EncodedWithXMLCoder">YES</bool>
-															<reference ref="917463045"/>
+															<reference ref="459733499"/>
 														</object>
 														<string key="NSFrame">{{1, 0}, {120, 17}}</string>
-														<reference key="NSSuperview" ref="202050240"/>
-														<reference key="NSNextKeyView" ref="917463045"/>
-														<reference key="NSDocView" ref="917463045"/>
+														<reference key="NSSuperview" ref="377785255"/>
+														<reference key="NSNextKeyView" ref="459733499"/>
+														<reference key="NSDocView" ref="459733499"/>
 														<reference key="NSBGColor" ref="512560731"/>
 														<int key="NScvFlags">4</int>
 													</object>
-													<reference ref="913709756"/>
 												</object>
-												<string key="NSFrame">{{133, 53}, {122, 96}}</string>
-												<reference key="NSSuperview" ref="646652655"/>
-												<reference key="NSNextKeyView" ref="219950644"/>
-												<int key="NSsFlags">562</int>
-												<reference key="NSVScroller" ref="817353191"/>
-												<reference key="NSHScroller" ref="529286880"/>
-												<reference key="NSContentView" ref="219950644"/>
-												<reference key="NSHeaderClipView" ref="342545830"/>
-												<reference key="NSCornerView" ref="913709756"/>
+												<string key="NSFrame">{{123, 66}, {122, 96}}</string>
+												<reference key="NSSuperview" ref="635100516"/>
+												<reference key="NSNextKeyView" ref="441382477"/>
+												<int key="NSsFlags">133682</int>
+												<reference key="NSVScroller" ref="176697034"/>
+												<reference key="NSHScroller" ref="79495429"/>
+												<reference key="NSContentView" ref="441382477"/>
+												<reference key="NSHeaderClipView" ref="302523439"/>
 												<bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
 											</object>
-											<object class="NSButton" id="988713632">
-												<reference key="NSNextResponder" ref="646652655"/>
+											<object class="NSButton" id="152999980">
+												<reference key="NSNextResponder" ref="635100516"/>
 												<int key="NSvFlags">292</int>
-												<string key="NSFrame">{{10, 33}, {18, 18}}</string>
-												<reference key="NSSuperview" ref="646652655"/>
-												<reference key="NSNextKeyView" ref="616473836"/>
+												<string key="NSFrame">{{0, 41}, {18, 18}}</string>
+												<reference key="NSSuperview" ref="635100516"/>
+												<reference key="NSNextKeyView" ref="756082975"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="758066746">
+												<object class="NSButtonCell" key="NSCell" id="863470950">
 													<int key="NSCellFlags">-2080244224</int>
 													<int key="NSCellFlags2">134217728</int>
 													<string key="NSContents"/>
 													<reference key="NSSupport" ref="271467070"/>
-													<reference key="NSControlView" ref="988713632"/>
+													<reference key="NSControlView" ref="152999980"/>
 													<int key="NSButtonFlags">-2033434369</int>
 													<int key="NSButtonFlags2">162</int>
-													<object class="NSCustomResource" key="NSNormalImage" id="996203705">
+													<object class="NSCustomResource" key="NSNormalImage" id="278760821">
 														<string key="NSClassName">NSImage</string>
 														<string key="NSResourceName">NSAddTemplate</string>
 													</object>
@@ -853,22 +988,22 @@
 													<int key="NSPeriodicInterval">75</int>
 												</object>
 											</object>
-											<object class="NSButton" id="616473836">
-												<reference key="NSNextResponder" ref="646652655"/>
+											<object class="NSButton" id="756082975">
+												<reference key="NSNextResponder" ref="635100516"/>
 												<int key="NSvFlags">292</int>
-												<string key="NSFrame">{{27, 33}, {18, 18}}</string>
-												<reference key="NSSuperview" ref="646652655"/>
-												<reference key="NSNextKeyView" ref="566469435"/>
+												<string key="NSFrame">{{17, 41}, {18, 18}}</string>
+												<reference key="NSSuperview" ref="635100516"/>
+												<reference key="NSNextKeyView" ref="716775631"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="866246455">
+												<object class="NSButtonCell" key="NSCell" id="381359215">
 													<int key="NSCellFlags">-2080244224</int>
 													<int key="NSCellFlags2">134217728</int>
 													<string key="NSContents"/>
 													<reference key="NSSupport" ref="271467070"/>
-													<reference key="NSControlView" ref="616473836"/>
+													<reference key="NSControlView" ref="756082975"/>
 													<int key="NSButtonFlags">-2033434369</int>
 													<int key="NSButtonFlags2">162</int>
-													<object class="NSCustomResource" key="NSNormalImage" id="520182850">
+													<object class="NSCustomResource" key="NSNormalImage" id="4076896">
 														<string key="NSClassName">NSImage</string>
 														<string key="NSResourceName">NSRemoveTemplate</string>
 													</object>
@@ -878,103 +1013,182 @@
 													<int key="NSPeriodicInterval">75</int>
 												</object>
 											</object>
-											<object class="NSBox" id="1073611401">
-												<reference key="NSNextResponder" ref="646652655"/>
-												<int key="NSvFlags">-2147483634</int>
-												<string key="NSFrame">{{0, 23}, {265, 5}}</string>
-												<reference key="NSSuperview" ref="646652655"/>
-												<reference key="NSNextKeyView" ref="724709226"/>
-												<string key="NSOffsets">{0, 0}</string>
-												<object class="NSTextFieldCell" key="NSTitleCell">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">0</int>
-													<string key="NSContents">Box</string>
-													<reference key="NSSupport" ref="271467070"/>
-													<reference key="NSBackgroundColor" ref="1019997203"/>
-													<object class="NSColor" key="NSTextColor">
-														<int key="NSColorSpace">3</int>
-														<bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes>
-													</object>
-												</object>
-												<int key="NSBorderType">3</int>
-												<int key="NSBoxType">2</int>
-												<int key="NSTitlePosition">0</int>
-												<bool key="NSTransparent">NO</bool>
-											</object>
-											<object class="NSButton" id="566469435">
-												<reference key="NSNextResponder" ref="646652655"/>
-												<int key="NSvFlags">292</int>
-												<string key="NSFrame">{{220, 33}, {18, 18}}</string>
-												<reference key="NSSuperview" ref="646652655"/>
-												<reference key="NSNextKeyView" ref="911168208"/>
+											<object class="NSButton" id="716775631">
+												<reference key="NSNextResponder" ref="635100516"/>
+												<int key="NSvFlags">289</int>
+												<string key="NSFrame">{{210, 41}, {18, 18}}</string>
+												<reference key="NSSuperview" ref="635100516"/>
+												<reference key="NSNextKeyView" ref="815622918"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="452212524">
+												<object class="NSButtonCell" key="NSCell" id="675243624">
 													<int key="NSCellFlags">-2080244224</int>
 													<int key="NSCellFlags2">134217728</int>
 													<string key="NSContents"/>
 													<reference key="NSSupport" ref="271467070"/>
-													<reference key="NSControlView" ref="566469435"/>
+													<reference key="NSControlView" ref="716775631"/>
 													<int key="NSButtonFlags">-2033434369</int>
 													<int key="NSButtonFlags2">162</int>
-													<reference key="NSNormalImage" ref="996203705"/>
+													<reference key="NSNormalImage" ref="278760821"/>
 													<string key="NSAlternateContents"/>
 													<string key="NSKeyEquivalent"/>
 													<int key="NSPeriodicDelay">400</int>
 													<int key="NSPeriodicInterval">75</int>
 												</object>
 											</object>
-											<object class="NSButton" id="911168208">
-												<reference key="NSNextResponder" ref="646652655"/>
-												<int key="NSvFlags">292</int>
-												<string key="NSFrame">{{237, 33}, {18, 18}}</string>
-												<reference key="NSSuperview" ref="646652655"/>
-												<reference key="NSNextKeyView" ref="1073611401"/>
+											<object class="NSButton" id="815622918">
+												<reference key="NSNextResponder" ref="635100516"/>
+												<int key="NSvFlags">289</int>
+												<string key="NSFrame">{{227, 41}, {18, 18}}</string>
+												<reference key="NSSuperview" ref="635100516"/>
+												<reference key="NSNextKeyView" ref="995829092"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="860456214">
+												<object class="NSButtonCell" key="NSCell" id="942965379">
 													<int key="NSCellFlags">-2080244224</int>
 													<int key="NSCellFlags2">134217728</int>
 													<string key="NSContents"/>
 													<reference key="NSSupport" ref="271467070"/>
-													<reference key="NSControlView" ref="911168208"/>
+													<reference key="NSControlView" ref="815622918"/>
 													<int key="NSButtonFlags">-2033434369</int>
 													<int key="NSButtonFlags2">162</int>
-													<reference key="NSNormalImage" ref="520182850"/>
+													<reference key="NSNormalImage" ref="4076896"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
+													<int key="NSPeriodicDelay">400</int>
+													<int key="NSPeriodicInterval">75</int>
+												</object>
+											</object>
+											<object class="NSButton" id="466584774">
+												<reference key="NSNextResponder" ref="635100516"/>
+												<int key="NSvFlags">289</int>
+												<string key="NSFrame">{{161, 4}, {72, 28}}</string>
+												<reference key="NSSuperview" ref="635100516"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="683879656">
+													<int key="NSCellFlags">-2080244224</int>
+													<int key="NSCellFlags2">134348800</int>
+													<string key="NSContents">Apply</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="466584774"/>
+													<int key="NSButtonFlags">-2034876161</int>
+													<int key="NSButtonFlags2">129</int>
+													<reference key="NSAlternateImage" ref="553785584"/>
 													<string key="NSAlternateContents"/>
 													<string key="NSKeyEquivalent"/>
 													<int key="NSPeriodicDelay">400</int>
 													<int key="NSPeriodicInterval">75</int>
 												</object>
 											</object>
+											<object class="NSButton" id="995829092">
+												<reference key="NSNextResponder" ref="635100516"/>
+												<int key="NSvFlags">289</int>
+												<string key="NSFrame">{{91, 4}, {72, 28}}</string>
+												<reference key="NSSuperview" ref="635100516"/>
+												<reference key="NSNextKeyView" ref="466584774"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="402776801">
+													<int key="NSCellFlags">-2080244224</int>
+													<int key="NSCellFlags2">134348800</int>
+													<string key="NSContents">Revert</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="995829092"/>
+													<int key="NSButtonFlags">-2034876161</int>
+													<int key="NSButtonFlags2">129</int>
+													<reference key="NSAlternateImage" ref="553785584"/>
+													<string key="NSAlternateContents"/>
+													<string type="base64-UTF8" key="NSKeyEquivalent">Gw</string>
+													<int key="NSPeriodicDelay">400</int>
+													<int key="NSPeriodicInterval">75</int>
+												</object>
+											</object>
 										</object>
-										<string key="NSFrameSize">{265, 159}</string>
-										<reference key="NSNextKeyView" ref="729122555"/>
+										<string key="NSFrame">{{10, 33}, {245, 165}}</string>
+										<reference key="NSNextKeyView" ref="427907042"/>
 									</object>
 									<string key="NSLabel">Groups</string>
 									<reference key="NSColor" ref="820783553"/>
-									<reference key="NSTabView" ref="564742342"/>
+									<reference key="NSTabView" ref="247568729"/>
 								</object>
 							</object>
-							<reference key="NSSelectedTabViewItem" ref="874188166"/>
+							<reference key="NSSelectedTabViewItem" ref="277431414"/>
 							<reference key="NSFont" ref="271467070"/>
-							<int key="NSTvFlags">6</int>
+							<int key="NSTvFlags">0</int>
 							<bool key="NSAllowTruncatedLabels">YES</bool>
 							<bool key="NSDrawsBackground">YES</bool>
 							<object class="NSMutableArray" key="NSSubviews">
 								<bool key="EncodedWithXMLCoder">YES</bool>
-								<reference ref="865103585"/>
+								<reference ref="646624756"/>
+							</object>
+						</object>
+						<object class="NSButton" id="287845150">
+							<reference key="NSNextResponder" ref="369507901"/>
+							<int key="NSvFlags">260</int>
+							<string key="NSFrame">{{20, 19}, {20, 20}}</string>
+							<reference key="NSSuperview" ref="369507901"/>
+							<reference key="NSWindow"/>
+							<reference key="NSNextKeyView" ref="862152318"/>
+							<string key="NSReuseIdentifierKey">_NS:2510</string>
+							<bool key="NSEnabled">YES</bool>
+							<object class="NSButtonCell" key="NSCell" id="607694530">
+								<int key="NSCellFlags">-2080244224</int>
+								<int key="NSCellFlags2">134217728</int>
+								<string key="NSContents"/>
+								<reference key="NSSupport" ref="271467070"/>
+								<string key="NSCellIdentifier">_NS:2510</string>
+								<reference key="NSControlView" ref="287845150"/>
+								<int key="NSButtonFlags">-2033434369</int>
+								<int key="NSButtonFlags2">162</int>
+								<reference key="NSNormalImage" ref="278760821"/>
+								<string key="NSAlternateContents"/>
+								<string key="NSKeyEquivalent"/>
+								<int key="NSPeriodicDelay">400</int>
+								<int key="NSPeriodicInterval">75</int>
+							</object>
+						</object>
+						<object class="NSButton" id="862152318">
+							<reference key="NSNextResponder" ref="369507901"/>
+							<int key="NSvFlags">260</int>
+							<string key="NSFrame">{{39, 19}, {20, 20}}</string>
+							<reference key="NSSuperview" ref="369507901"/>
+							<reference key="NSWindow"/>
+							<reference key="NSNextKeyView" ref="247568729"/>
+							<string key="NSReuseIdentifierKey">_NS:2510</string>
+							<bool key="NSEnabled">YES</bool>
+							<object class="NSButtonCell" key="NSCell" id="850026501">
+								<int key="NSCellFlags">-2080244224</int>
+								<int key="NSCellFlags2">134217728</int>
+								<string key="NSContents"/>
+								<reference key="NSSupport" ref="271467070"/>
+								<string key="NSCellIdentifier">_NS:2510</string>
+								<reference key="NSControlView" ref="862152318"/>
+								<int key="NSButtonFlags">-2033434369</int>
+								<int key="NSButtonFlags2">162</int>
+								<reference key="NSNormalImage" ref="4076896"/>
+								<string key="NSAlternateContents"/>
+								<string key="NSKeyEquivalent"/>
+								<int key="NSPeriodicDelay">400</int>
+								<int key="NSPeriodicInterval">75</int>
 							</object>
 						</object>
 					</object>
-					<string key="NSFrameSize">{265, 159}</string>
+					<string key="NSFrameSize">{425, 262}</string>
 					<reference key="NSSuperview"/>
-					<reference key="NSNextKeyView" ref="564742342"/>
+					<reference key="NSWindow"/>
+					<reference key="NSNextKeyView" ref="419137310"/>
 				</object>
 				<string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
-				<string key="NSMinSize">{265, 237}</string>
-				<string key="NSMaxSize">{265, 237}</string>
+				<string key="NSMinSize">{425, 284}</string>
+				<string key="NSMaxSize">{425, 284}</string>
+				<bool key="NSWindowIsRestorable">YES</bool>
 			</object>
-			<object class="NSUserDefaultsController" id="700105088">
-				<bool key="NSSharedInstance">YES</bool>
+			<object class="NSArrayController" id="994230656">
+				<string key="NSObjectClassName">PithosAccount</string>
+				<bool key="NSEditable">YES</bool>
+				<object class="_NSManagedProxy" key="_NSManagedProxy"/>
+				<bool key="NSAvoidsEmptySelection">YES</bool>
+				<bool key="NSPreservesSelection">YES</bool>
+				<bool key="NSSelectsInsertedObjects">YES</bool>
+				<bool key="NSFilterRestrictsInsertion">YES</bool>
+				<bool key="NSClearsFilterPredicateOnInsertion">YES</bool>
 			</object>
 			<object class="NSDictionaryController" id="980977849">
 				<bool key="NSEditable">YES</bool>
@@ -1031,267 +1245,574 @@
 					<int key="connectionID">198</int>
 				</object>
 				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">selectedGroupMembersDictionaryController</string>
+						<reference key="source" ref="1001"/>
+						<reference key="destination" ref="665074782"/>
+					</object>
+					<int key="connectionID">462</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">groupsDictionaryController</string>
+						<reference key="source" ref="1001"/>
+						<reference key="destination" ref="980977849"/>
+					</object>
+					<int key="connectionID">461</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">accountsArrayController</string>
+						<reference key="source" ref="1001"/>
+						<reference key="destination" ref="994230656"/>
+					</object>
+					<int key="connectionID">646</int>
+				</object>
+				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<string key="label">toolbarItemSelected:</string>
+						<string key="label">login:</string>
 						<reference key="source" ref="1001"/>
-						<reference key="destination" ref="902282627"/>
+						<reference key="destination" ref="750494034"/>
 					</object>
-					<int key="connectionID">209</int>
+					<int key="connectionID">664</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<string key="label">toolbarItemSelected:</string>
+						<string key="label">loginCancel:</string>
 						<reference key="source" ref="1001"/>
-						<reference key="destination" ref="1048882913"/>
+						<reference key="destination" ref="764785507"/>
 					</object>
-					<int key="connectionID">214</int>
+					<int key="connectionID">685</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<string key="label">authenticationLogin:</string>
+						<string key="label">syncApply:</string>
 						<reference key="source" ref="1001"/>
-						<reference key="destination" ref="852692720"/>
+						<reference key="destination" ref="430121568"/>
 					</object>
-					<int key="connectionID">356</int>
+					<int key="connectionID">710</int>
 				</object>
 				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">groupsDictionaryController</string>
+					<object class="IBActionConnection" key="connection">
+						<string key="label">syncCancel:</string>
 						<reference key="source" ref="1001"/>
-						<reference key="destination" ref="980977849"/>
+						<reference key="destination" ref="915820146"/>
 					</object>
-					<int key="connectionID">461</int>
+					<int key="connectionID">711</int>
 				</object>
 				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">selectedGroupMembersDictionaryController</string>
+					<object class="IBActionConnection" key="connection">
+						<string key="label">groupsRevert:</string>
 						<reference key="source" ref="1001"/>
-						<reference key="destination" ref="665074782"/>
+						<reference key="destination" ref="995829092"/>
 					</object>
-					<int key="connectionID">462</int>
+					<int key="connectionID">801</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">groupsApply:</string>
+						<reference key="source" ref="1001"/>
+						<reference key="destination" ref="466584774"/>
+					</object>
+					<int key="connectionID">802</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">addAccount:</string>
+						<reference key="source" ref="1001"/>
+						<reference key="destination" ref="287845150"/>
+					</object>
+					<int key="connectionID">811</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">removeAccount:</string>
+						<reference key="source" ref="1001"/>
+						<reference key="destination" ref="862152318"/>
+					</object>
+					<int key="connectionID">865</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">add:</string>
+						<reference key="source" ref="980977849"/>
+						<reference key="destination" ref="152999980"/>
+					</object>
+					<int key="connectionID">776</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">remove:</string>
+						<reference key="source" ref="980977849"/>
+						<reference key="destination" ref="756082975"/>
+					</object>
+					<int key="connectionID">777</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">contentDictionary: selection.accountNode.pithosAccount.groups</string>
+						<reference key="source" ref="980977849"/>
+						<reference key="destination" ref="994230656"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="980977849"/>
+							<reference key="NSDestination" ref="994230656"/>
+							<string key="NSLabel">contentDictionary: selection.accountNode.pithosAccount.groups</string>
+							<string key="NSBinding">contentDictionary</string>
+							<string key="NSKeyPath">selection.accountNode.pithosAccount.groups</string>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">864</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">contentDictionary: selection.value</string>
+						<reference key="source" ref="665074782"/>
+						<reference key="destination" ref="980977849"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="665074782"/>
+							<reference key="NSDestination" ref="980977849"/>
+							<string key="NSLabel">contentDictionary: selection.value</string>
+							<string key="NSBinding">contentDictionary</string>
+							<string key="NSKeyPath">selection.value</string>
+							<object class="NSDictionary" key="NSOptions">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSArray" key="dict.sortedKeys">
+									<bool key="EncodedWithXMLCoder">YES</bool>
+									<string>NSValidatesImmediately</string>
+									<string>NSValueTransformerName</string>
+								</object>
+								<object class="NSArray" key="dict.values">
+									<bool key="EncodedWithXMLCoder">YES</bool>
+									<boolean value="YES"/>
+									<string>GroupMembersDictionaryTransformer</string>
+								</object>
+							</object>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">448</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">add:</string>
+						<reference key="source" ref="665074782"/>
+						<reference key="destination" ref="716775631"/>
+					</object>
+					<int key="connectionID">779</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">remove:</string>
+						<reference key="source" ref="665074782"/>
+						<reference key="destination" ref="815622918"/>
+					</object>
+					<int key="connectionID">780</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">content: arrangedObjects</string>
+						<reference key="source" ref="260212452"/>
+						<reference key="destination" ref="994230656"/>
+						<object class="NSNibBindingConnector" key="connector" id="815261017">
+							<reference key="NSSource" ref="260212452"/>
+							<reference key="NSDestination" ref="994230656"/>
+							<string key="NSLabel">content: arrangedObjects</string>
+							<string key="NSBinding">content</string>
+							<string key="NSKeyPath">arrangedObjects</string>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">632</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">selectionIndexes: selectionIndexes</string>
+						<reference key="source" ref="260212452"/>
+						<reference key="destination" ref="994230656"/>
+						<object class="NSNibBindingConnector" key="connector" id="316883048">
+							<reference key="NSSource" ref="260212452"/>
+							<reference key="NSDestination" ref="994230656"/>
+							<string key="NSLabel">selectionIndexes: selectionIndexes</string>
+							<string key="NSBinding">selectionIndexes</string>
+							<string key="NSKeyPath">selectionIndexes</string>
+							<reference key="NSPreviousConnector" ref="815261017"/>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">859</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">sortDescriptors: sortDescriptors</string>
+						<reference key="source" ref="260212452"/>
+						<reference key="destination" ref="994230656"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="260212452"/>
+							<reference key="NSDestination" ref="994230656"/>
+							<string key="NSLabel">sortDescriptors: sortDescriptors</string>
+							<string key="NSBinding">sortDescriptors</string>
+							<string key="NSKeyPath">sortDescriptors</string>
+							<reference key="NSPreviousConnector" ref="316883048"/>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">861</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">value: arrangedObjects.name</string>
+						<reference key="source" ref="742841349"/>
+						<reference key="destination" ref="994230656"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="742841349"/>
+							<reference key="NSDestination" ref="994230656"/>
+							<string key="NSLabel">value: arrangedObjects.name</string>
+							<string key="NSBinding">value</string>
+							<string key="NSKeyPath">arrangedObjects.name</string>
+							<object class="NSDictionary" key="NSOptions">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSArray" key="dict.sortedKeys">
+									<bool key="EncodedWithXMLCoder">YES</bool>
+									<string>NSConditionallySetsEditable</string>
+									<string>NSValidatesImmediately</string>
+								</object>
+								<object class="NSArray" key="dict.values">
+									<bool key="EncodedWithXMLCoder">YES</bool>
+									<boolean value="NO"/>
+									<boolean value="YES"/>
+								</object>
+							</object>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">635</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">enabled: delegate.activated</string>
+						<reference key="source" ref="287845150"/>
+						<reference key="destination" ref="1004"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="287845150"/>
+							<reference key="NSDestination" ref="1004"/>
+							<string key="NSLabel">enabled: delegate.activated</string>
+							<string key="NSBinding">enabled</string>
+							<string key="NSKeyPath">delegate.activated</string>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">580</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">enabled: accountRemoveEnable</string>
+						<reference key="source" ref="862152318"/>
+						<reference key="destination" ref="1001"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="862152318"/>
+							<reference key="NSDestination" ref="1001"/>
+							<string key="NSLabel">enabled: accountRemoveEnable</string>
+							<string key="NSBinding">enabled</string>
+							<string key="NSKeyPath">accountRemoveEnable</string>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">825</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">enabled: delegate.activated</string>
+						<reference key="source" ref="850026501"/>
+						<reference key="destination" ref="1004"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="850026501"/>
+							<reference key="NSDestination" ref="1004"/>
+							<string key="NSLabel">enabled: delegate.activated</string>
+							<string key="NSBinding">enabled</string>
+							<string key="NSKeyPath">delegate.activated</string>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">582</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">value: serverURL</string>
+						<reference key="source" ref="96425952"/>
+						<reference key="destination" ref="1001"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="96425952"/>
+							<reference key="NSDestination" ref="1001"/>
+							<string key="NSLabel">value: serverURL</string>
+							<string key="NSBinding">value</string>
+							<string key="NSKeyPath">serverURL</string>
+							<object class="NSDictionary" key="NSOptions">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSArray" key="dict.sortedKeys">
+									<bool key="EncodedWithXMLCoder">YES</bool>
+									<string>NSConditionallySetsEditable</string>
+									<string>NSContinuouslyUpdatesValue</string>
+									<string>NSValidatesImmediately</string>
+								</object>
+								<object class="NSArray" key="dict.values">
+									<bool key="EncodedWithXMLCoder">YES</bool>
+									<boolean value="NO"/>
+									<boolean value="YES"/>
+									<boolean value="YES"/>
+								</object>
+							</object>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">679</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">enabled: manual</string>
+						<reference key="source" ref="287579732"/>
+						<reference key="destination" ref="1001"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="287579732"/>
+							<reference key="NSDestination" ref="1001"/>
+							<string key="NSLabel">enabled: manual</string>
+							<string key="NSBinding">enabled</string>
+							<string key="NSKeyPath">manual</string>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">598</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">value: authUser</string>
+						<reference key="source" ref="287579732"/>
+						<reference key="destination" ref="1001"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="287579732"/>
+							<reference key="NSDestination" ref="1001"/>
+							<string key="NSLabel">value: authUser</string>
+							<string key="NSBinding">value</string>
+							<string key="NSKeyPath">authUser</string>
+							<object class="NSDictionary" key="NSOptions">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSArray" key="dict.sortedKeys">
+									<bool key="EncodedWithXMLCoder">YES</bool>
+									<string>NSContinuouslyUpdatesValue</string>
+									<string>NSValidatesImmediately</string>
+								</object>
+								<object class="NSArray" key="dict.values">
+									<bool key="EncodedWithXMLCoder">YES</bool>
+									<boolean value="YES"/>
+									<boolean value="YES"/>
+								</object>
+							</object>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">674</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
-						<string key="label">selectedIndex: window.toolbar.selectedItemIdentifier</string>
-						<reference key="source" ref="564742342"/>
+						<string key="label">enabled: manual</string>
+						<reference key="source" ref="773004803"/>
 						<reference key="destination" ref="1001"/>
 						<object class="NSNibBindingConnector" key="connector">
-							<reference key="NSSource" ref="564742342"/>
+							<reference key="NSSource" ref="773004803"/>
 							<reference key="NSDestination" ref="1001"/>
-							<string key="NSLabel">selectedIndex: window.toolbar.selectedItemIdentifier</string>
-							<string key="NSBinding">selectedIndex</string>
-							<string key="NSKeyPath">window.toolbar.selectedItemIdentifier</string>
+							<string key="NSLabel">enabled: manual</string>
+							<string key="NSBinding">enabled</string>
+							<string key="NSKeyPath">manual</string>
 							<int key="NSNibBindingConnectorVersion">2</int>
 						</object>
 					</object>
-					<int key="connectionID">208</int>
+					<int key="connectionID">600</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
-						<string key="label">target: pithosBrowserController.accountNode</string>
-						<reference key="source" ref="724709226"/>
+						<string key="label">value: authToken</string>
+						<reference key="source" ref="773004803"/>
 						<reference key="destination" ref="1001"/>
 						<object class="NSNibBindingConnector" key="connector">
-							<reference key="NSSource" ref="724709226"/>
+							<reference key="NSSource" ref="773004803"/>
 							<reference key="NSDestination" ref="1001"/>
-							<string key="NSLabel">target: pithosBrowserController.accountNode</string>
-							<string key="NSBinding">target</string>
-							<string key="NSKeyPath">pithosBrowserController.accountNode</string>
+							<string key="NSLabel">value: authToken</string>
+							<string key="NSBinding">value</string>
+							<string key="NSKeyPath">authToken</string>
 							<object class="NSDictionary" key="NSOptions">
-								<string key="NS.key.0">NSSelectorName</string>
-								<string key="NS.object.0">refreshInfo</string>
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSArray" key="dict.sortedKeys">
+									<bool key="EncodedWithXMLCoder">YES</bool>
+									<string>NSContinuouslyUpdatesValue</string>
+									<string>NSValidatesImmediately</string>
+								</object>
+								<object class="NSArray" key="dict.values">
+									<bool key="EncodedWithXMLCoder">YES</bool>
+									<boolean value="YES"/>
+									<boolean value="YES"/>
+								</object>
 							</object>
 							<int key="NSNibBindingConnectorVersion">2</int>
 						</object>
 					</object>
-					<int key="connectionID">395</int>
+					<int key="connectionID">675</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
-						<string key="label">target: self</string>
-						<reference key="source" ref="131074952"/>
+						<string key="label">value: manual</string>
+						<reference key="source" ref="666198740"/>
 						<reference key="destination" ref="1001"/>
 						<object class="NSNibBindingConnector" key="connector">
-							<reference key="NSSource" ref="131074952"/>
+							<reference key="NSSource" ref="666198740"/>
 							<reference key="NSDestination" ref="1001"/>
-							<string key="NSLabel">target: self</string>
-							<string key="NSBinding">target</string>
-							<string key="NSKeyPath">self</string>
+							<string key="NSLabel">value: manual</string>
+							<string key="NSBinding">value</string>
+							<string key="NSKeyPath">manual</string>
 							<object class="NSDictionary" key="NSOptions">
-								<string key="NS.key.0">NSSelectorName</string>
-								<string key="NS.object.0">applyGroups</string>
+								<string key="NS.key.0">NSValidatesImmediately</string>
+								<boolean value="YES" key="NS.object.0"/>
 							</object>
 							<int key="NSNibBindingConnectorVersion">2</int>
 						</object>
 					</object>
-					<int key="connectionID">465</int>
+					<int key="connectionID">558</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
-						<string key="label">enabled: canRemove</string>
-						<reference key="source" ref="616473836"/>
-						<reference key="destination" ref="980977849"/>
+						<string key="label">enabled: loginEnable</string>
+						<reference key="source" ref="750494034"/>
+						<reference key="destination" ref="1001"/>
 						<object class="NSNibBindingConnector" key="connector">
-							<reference key="NSSource" ref="616473836"/>
-							<reference key="NSDestination" ref="980977849"/>
-							<string key="NSLabel">enabled: canRemove</string>
+							<reference key="NSSource" ref="750494034"/>
+							<reference key="NSDestination" ref="1001"/>
+							<string key="NSLabel">enabled: loginEnable</string>
 							<string key="NSBinding">enabled</string>
-							<string key="NSKeyPath">canRemove</string>
-							<int key="NSNibBindingConnectorVersion">2</int>
-						</object>
-					</object>
-					<int key="connectionID">455</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBBindingConnection" key="connection">
-						<string key="label">content: arrangedObjects</string>
-						<reference key="source" ref="30388460"/>
-						<reference key="destination" ref="980977849"/>
-						<object class="NSNibBindingConnector" key="connector" id="796087751">
-							<reference key="NSSource" ref="30388460"/>
-							<reference key="NSDestination" ref="980977849"/>
-							<string key="NSLabel">content: arrangedObjects</string>
-							<string key="NSBinding">content</string>
-							<string key="NSKeyPath">arrangedObjects</string>
+							<string key="NSKeyPath">loginEnable</string>
 							<int key="NSNibBindingConnectorVersion">2</int>
 						</object>
 					</object>
-					<int key="connectionID">399</int>
+					<int key="connectionID">678</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
-						<string key="label">selectionIndexes: selectionIndexes</string>
-						<reference key="source" ref="30388460"/>
-						<reference key="destination" ref="980977849"/>
-						<object class="NSNibBindingConnector" key="connector" id="511216149">
-							<reference key="NSSource" ref="30388460"/>
-							<reference key="NSDestination" ref="980977849"/>
-							<string key="NSLabel">selectionIndexes: selectionIndexes</string>
-							<string key="NSBinding">selectionIndexes</string>
-							<string key="NSKeyPath">selectionIndexes</string>
-							<reference key="NSPreviousConnector" ref="796087751"/>
+						<string key="label">contentArray: delegate.pithosAccounts</string>
+						<reference key="source" ref="994230656"/>
+						<reference key="destination" ref="1004"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="994230656"/>
+							<reference key="NSDestination" ref="1004"/>
+							<string key="NSLabel">contentArray: delegate.pithosAccounts</string>
+							<string key="NSBinding">contentArray</string>
+							<string key="NSKeyPath">delegate.pithosAccounts</string>
 							<int key="NSNibBindingConnectorVersion">2</int>
 						</object>
 					</object>
-					<int key="connectionID">401</int>
+					<int key="connectionID">627</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
-						<string key="label">sortDescriptors: sortDescriptors</string>
-						<reference key="source" ref="30388460"/>
-						<reference key="destination" ref="980977849"/>
+						<string key="label">enabled: loginCancelEnable</string>
+						<reference key="source" ref="764785507"/>
+						<reference key="destination" ref="1001"/>
 						<object class="NSNibBindingConnector" key="connector">
-							<reference key="NSSource" ref="30388460"/>
-							<reference key="NSDestination" ref="980977849"/>
-							<string key="NSLabel">sortDescriptors: sortDescriptors</string>
-							<string key="NSBinding">sortDescriptors</string>
-							<string key="NSKeyPath">sortDescriptors</string>
-							<reference key="NSPreviousConnector" ref="511216149"/>
+							<reference key="NSSource" ref="764785507"/>
+							<reference key="NSDestination" ref="1001"/>
+							<string key="NSLabel">enabled: loginCancelEnable</string>
+							<string key="NSBinding">enabled</string>
+							<string key="NSKeyPath">loginCancelEnable</string>
 							<int key="NSNibBindingConnectorVersion">2</int>
 						</object>
 					</object>
-					<int key="connectionID">403</int>
+					<int key="connectionID">688</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
-						<string key="label">value: arrangedObjects.key</string>
-						<reference key="source" ref="801247121"/>
-						<reference key="destination" ref="980977849"/>
+						<string key="label">value: syncDirectoryPath</string>
+						<reference key="source" ref="312807152"/>
+						<reference key="destination" ref="1001"/>
 						<object class="NSNibBindingConnector" key="connector">
-							<reference key="NSSource" ref="801247121"/>
-							<reference key="NSDestination" ref="980977849"/>
-							<string key="NSLabel">value: arrangedObjects.key</string>
+							<reference key="NSSource" ref="312807152"/>
+							<reference key="NSDestination" ref="1001"/>
+							<string key="NSLabel">value: syncDirectoryPath</string>
 							<string key="NSBinding">value</string>
-							<string key="NSKeyPath">arrangedObjects.key</string>
+							<string key="NSKeyPath">syncDirectoryPath</string>
 							<object class="NSDictionary" key="NSOptions">
 								<bool key="EncodedWithXMLCoder">YES</bool>
 								<object class="NSArray" key="dict.sortedKeys">
 									<bool key="EncodedWithXMLCoder">YES</bool>
-									<string>NSConditionallySetsEditable</string>
 									<string>NSValidatesImmediately</string>
+									<string>NSValueTransformerName</string>
 								</object>
-								<object class="NSMutableArray" key="dict.values">
+								<object class="NSArray" key="dict.values">
 									<bool key="EncodedWithXMLCoder">YES</bool>
-									<boolean value="NO"/>
 									<boolean value="YES"/>
+									<string>DirPathFileURLTransformer</string>
 								</object>
 							</object>
 							<int key="NSNibBindingConnectorVersion">2</int>
 						</object>
 					</object>
-					<int key="connectionID">407</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">formatter</string>
-						<reference key="source" ref="410705345"/>
-						<reference key="destination" ref="894212860"/>
-					</object>
-					<int key="connectionID">450</int>
+					<int key="connectionID">695</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
-						<string key="label">enabled: canRemove</string>
-						<reference key="source" ref="911168208"/>
-						<reference key="destination" ref="665074782"/>
+						<string key="label">enabled: selection.active</string>
+						<reference key="source" ref="312807152"/>
+						<reference key="destination" ref="994230656"/>
 						<object class="NSNibBindingConnector" key="connector">
-							<reference key="NSSource" ref="911168208"/>
-							<reference key="NSDestination" ref="665074782"/>
-							<string key="NSLabel">enabled: canRemove</string>
+							<reference key="NSSource" ref="312807152"/>
+							<reference key="NSDestination" ref="994230656"/>
+							<string key="NSLabel">enabled: selection.active</string>
 							<string key="NSBinding">enabled</string>
-							<string key="NSKeyPath">canRemove</string>
+							<string key="NSKeyPath">selection.active</string>
 							<int key="NSNibBindingConnectorVersion">2</int>
 						</object>
 					</object>
-					<int key="connectionID">460</int>
+					<int key="connectionID">851</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
-						<string key="label">value: values.authUser</string>
-						<reference key="source" ref="379730869"/>
-						<reference key="destination" ref="700105088"/>
+						<string key="label">enabled: syncApplyEnable</string>
+						<reference key="source" ref="430121568"/>
+						<reference key="destination" ref="1001"/>
 						<object class="NSNibBindingConnector" key="connector">
-							<reference key="NSSource" ref="379730869"/>
-							<reference key="NSDestination" ref="700105088"/>
-							<string key="NSLabel">value: values.authUser</string>
-							<string key="NSBinding">value</string>
-							<string key="NSKeyPath">values.authUser</string>
-							<object class="NSDictionary" key="NSOptions">
-								<string key="NS.key.0">NSValidatesImmediately</string>
-								<boolean value="YES" key="NS.object.0"/>
-							</object>
+							<reference key="NSSource" ref="430121568"/>
+							<reference key="NSDestination" ref="1001"/>
+							<string key="NSLabel">enabled: syncApplyEnable</string>
+							<string key="NSBinding">enabled</string>
+							<string key="NSKeyPath">syncApplyEnable</string>
 							<int key="NSNibBindingConnectorVersion">2</int>
 						</object>
 					</object>
-					<int key="connectionID">373</int>
+					<int key="connectionID">716</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
-						<string key="label">enabled: manual</string>
-						<reference key="source" ref="379730869"/>
+						<string key="label">enabled: syncCancelEnable</string>
+						<reference key="source" ref="915820146"/>
 						<reference key="destination" ref="1001"/>
 						<object class="NSNibBindingConnector" key="connector">
-							<reference key="NSSource" ref="379730869"/>
+							<reference key="NSSource" ref="915820146"/>
 							<reference key="NSDestination" ref="1001"/>
-							<string key="NSLabel">enabled: manual</string>
+							<string key="NSLabel">enabled: syncCancelEnable</string>
 							<string key="NSBinding">enabled</string>
-							<string key="NSKeyPath">manual</string>
+							<string key="NSKeyPath">syncCancelEnable</string>
 							<int key="NSNibBindingConnectorVersion">2</int>
 						</object>
 					</object>
-					<int key="connectionID">491</int>
+					<int key="connectionID">713</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
-						<string key="label">value: values.authToken</string>
-						<reference key="source" ref="682758465"/>
-						<reference key="destination" ref="700105088"/>
+						<string key="label">value: syncActive</string>
+						<reference key="source" ref="893175748"/>
+						<reference key="destination" ref="1001"/>
 						<object class="NSNibBindingConnector" key="connector">
-							<reference key="NSSource" ref="682758465"/>
-							<reference key="NSDestination" ref="700105088"/>
-							<string key="NSLabel">value: values.authToken</string>
+							<reference key="NSSource" ref="893175748"/>
+							<reference key="NSDestination" ref="1001"/>
+							<string key="NSLabel">value: syncActive</string>
 							<string key="NSBinding">value</string>
-							<string key="NSKeyPath">values.authToken</string>
+							<string key="NSKeyPath">syncActive</string>
 							<object class="NSDictionary" key="NSOptions">
 								<string key="NS.key.0">NSValidatesImmediately</string>
 								<boolean value="YES" key="NS.object.0"/>
@@ -1299,51 +1820,31 @@
 							<int key="NSNibBindingConnectorVersion">2</int>
 						</object>
 					</object>
-					<int key="connectionID">374</int>
+					<int key="connectionID">803</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
-						<string key="label">enabled: manual</string>
-						<reference key="source" ref="682758465"/>
-						<reference key="destination" ref="1001"/>
+						<string key="label">enabled: selection.active</string>
+						<reference key="source" ref="893175748"/>
+						<reference key="destination" ref="994230656"/>
 						<object class="NSNibBindingConnector" key="connector">
-							<reference key="NSSource" ref="682758465"/>
-							<reference key="NSDestination" ref="1001"/>
-							<string key="NSLabel">enabled: manual</string>
+							<reference key="NSSource" ref="893175748"/>
+							<reference key="NSDestination" ref="994230656"/>
+							<string key="NSLabel">enabled: selection.active</string>
 							<string key="NSBinding">enabled</string>
-							<string key="NSKeyPath">manual</string>
-							<int key="NSNibBindingConnectorVersion">2</int>
-						</object>
-					</object>
-					<int key="connectionID">492</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBBindingConnection" key="connection">
-						<string key="label">value: manual</string>
-						<reference key="source" ref="892129196"/>
-						<reference key="destination" ref="1001"/>
-						<object class="NSNibBindingConnector" key="connector">
-							<reference key="NSSource" ref="892129196"/>
-							<reference key="NSDestination" ref="1001"/>
-							<string key="NSLabel">value: manual</string>
-							<string key="NSBinding">value</string>
-							<string key="NSKeyPath">manual</string>
-							<object class="NSDictionary" key="NSOptions">
-								<string key="NS.key.0">NSValidatesImmediately</string>
-								<boolean value="YES" key="NS.object.0"/>
-							</object>
+							<string key="NSKeyPath">selection.active</string>
 							<int key="NSNibBindingConnectorVersion">2</int>
 						</object>
 					</object>
-					<int key="connectionID">494</int>
+					<int key="connectionID">853</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
 						<string key="label">content: arrangedObjects</string>
-						<reference key="source" ref="955904863"/>
+						<reference key="source" ref="801276999"/>
 						<reference key="destination" ref="665074782"/>
-						<object class="NSNibBindingConnector" key="connector" id="918816983">
-							<reference key="NSSource" ref="955904863"/>
+						<object class="NSNibBindingConnector" key="connector" id="712495578">
+							<reference key="NSSource" ref="801276999"/>
 							<reference key="NSDestination" ref="665074782"/>
 							<string key="NSLabel">content: arrangedObjects</string>
 							<string key="NSBinding">content</string>
@@ -1351,49 +1852,65 @@
 							<int key="NSNibBindingConnectorVersion">2</int>
 						</object>
 					</object>
-					<int key="connectionID">439</int>
+					<int key="connectionID">791</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
 						<string key="label">selectionIndexes: selectionIndexes</string>
-						<reference key="source" ref="955904863"/>
+						<reference key="source" ref="801276999"/>
 						<reference key="destination" ref="665074782"/>
-						<object class="NSNibBindingConnector" key="connector" id="587343233">
-							<reference key="NSSource" ref="955904863"/>
+						<object class="NSNibBindingConnector" key="connector" id="171640760">
+							<reference key="NSSource" ref="801276999"/>
 							<reference key="NSDestination" ref="665074782"/>
 							<string key="NSLabel">selectionIndexes: selectionIndexes</string>
 							<string key="NSBinding">selectionIndexes</string>
 							<string key="NSKeyPath">selectionIndexes</string>
-							<reference key="NSPreviousConnector" ref="918816983"/>
+							<reference key="NSPreviousConnector" ref="712495578"/>
 							<int key="NSNibBindingConnectorVersion">2</int>
 						</object>
 					</object>
-					<int key="connectionID">441</int>
+					<int key="connectionID">793</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
 						<string key="label">sortDescriptors: sortDescriptors</string>
-						<reference key="source" ref="955904863"/>
+						<reference key="source" ref="801276999"/>
 						<reference key="destination" ref="665074782"/>
 						<object class="NSNibBindingConnector" key="connector">
-							<reference key="NSSource" ref="955904863"/>
+							<reference key="NSSource" ref="801276999"/>
 							<reference key="NSDestination" ref="665074782"/>
 							<string key="NSLabel">sortDescriptors: sortDescriptors</string>
 							<string key="NSBinding">sortDescriptors</string>
 							<string key="NSKeyPath">sortDescriptors</string>
-							<reference key="NSPreviousConnector" ref="587343233"/>
+							<reference key="NSPreviousConnector" ref="171640760"/>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">795</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">enabled: selection.active</string>
+						<reference key="source" ref="801276999"/>
+						<reference key="destination" ref="994230656"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="801276999"/>
+							<reference key="NSDestination" ref="994230656"/>
+							<string key="NSLabel">enabled: selection.active</string>
+							<string key="NSBinding">enabled</string>
+							<string key="NSKeyPath">selection.active</string>
 							<int key="NSNibBindingConnectorVersion">2</int>
 						</object>
 					</object>
-					<int key="connectionID">443</int>
+					<int key="connectionID">844</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
 						<string key="label">value: arrangedObjects.key</string>
-						<reference key="source" ref="604806618"/>
+						<reference key="source" ref="158961369"/>
 						<reference key="destination" ref="665074782"/>
 						<object class="NSNibBindingConnector" key="connector">
-							<reference key="NSSource" ref="604806618"/>
+							<reference key="NSSource" ref="158961369"/>
 							<reference key="NSDestination" ref="665074782"/>
 							<string key="NSLabel">value: arrangedObjects.key</string>
 							<string key="NSBinding">value</string>
@@ -1405,7 +1922,7 @@
 									<string>NSConditionallySetsEditable</string>
 									<string>NSValidatesImmediately</string>
 								</object>
-								<object class="NSMutableArray" key="dict.values">
+								<object class="NSArray" key="dict.values">
 									<bool key="EncodedWithXMLCoder">YES</bool>
 									<boolean value="NO"/>
 									<boolean value="YES"/>
@@ -1414,121 +1931,198 @@
 							<int key="NSNibBindingConnectorVersion">2</int>
 						</object>
 					</object>
-					<int key="connectionID">447</int>
+					<int key="connectionID">800</int>
 				</object>
 				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">formatter</string>
-						<reference key="source" ref="809830821"/>
-						<reference key="destination" ref="894212860"/>
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">content: arrangedObjects</string>
+						<reference key="source" ref="199904301"/>
+						<reference key="destination" ref="980977849"/>
+						<object class="NSNibBindingConnector" key="connector" id="1055079241">
+							<reference key="NSSource" ref="199904301"/>
+							<reference key="NSDestination" ref="980977849"/>
+							<string key="NSLabel">content: arrangedObjects</string>
+							<string key="NSBinding">content</string>
+							<string key="NSKeyPath">arrangedObjects</string>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
 					</object>
-					<int key="connectionID">451</int>
+					<int key="connectionID">781</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
-						<string key="label">contentDictionary: pithosBrowserController.accountNode.pithosAccount.groups</string>
-						<reference key="source" ref="980977849"/>
-						<reference key="destination" ref="1001"/>
-						<object class="NSNibBindingConnector" key="connector">
-							<reference key="NSSource" ref="980977849"/>
-							<reference key="NSDestination" ref="1001"/>
-							<string key="NSLabel">contentDictionary: pithosBrowserController.accountNode.pithosAccount.groups</string>
-							<string key="NSBinding">contentDictionary</string>
-							<string key="NSKeyPath">pithosBrowserController.accountNode.pithosAccount.groups</string>
+						<string key="label">selectionIndexes: selectionIndexes</string>
+						<reference key="source" ref="199904301"/>
+						<reference key="destination" ref="980977849"/>
+						<object class="NSNibBindingConnector" key="connector" id="94684130">
+							<reference key="NSSource" ref="199904301"/>
+							<reference key="NSDestination" ref="980977849"/>
+							<string key="NSLabel">selectionIndexes: selectionIndexes</string>
+							<string key="NSBinding">selectionIndexes</string>
+							<string key="NSKeyPath">selectionIndexes</string>
+							<reference key="NSPreviousConnector" ref="1055079241"/>
 							<int key="NSNibBindingConnectorVersion">2</int>
 						</object>
 					</object>
-					<int key="connectionID">398</int>
+					<int key="connectionID">783</int>
 				</object>
 				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">add:</string>
-						<reference key="source" ref="980977849"/>
-						<reference key="destination" ref="988713632"/>
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">sortDescriptors: sortDescriptors</string>
+						<reference key="source" ref="199904301"/>
+						<reference key="destination" ref="980977849"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="199904301"/>
+							<reference key="NSDestination" ref="980977849"/>
+							<string key="NSLabel">sortDescriptors: sortDescriptors</string>
+							<string key="NSBinding">sortDescriptors</string>
+							<string key="NSKeyPath">sortDescriptors</string>
+							<reference key="NSPreviousConnector" ref="94684130"/>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
 					</object>
-					<int key="connectionID">452</int>
+					<int key="connectionID">785</int>
 				</object>
 				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">remove:</string>
-						<reference key="source" ref="980977849"/>
-						<reference key="destination" ref="616473836"/>
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">enabled: selection.active</string>
+						<reference key="source" ref="199904301"/>
+						<reference key="destination" ref="994230656"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="199904301"/>
+							<reference key="NSDestination" ref="994230656"/>
+							<string key="NSLabel">enabled: selection.active</string>
+							<string key="NSBinding">enabled</string>
+							<string key="NSKeyPath">selection.active</string>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
 					</object>
-					<int key="connectionID">456</int>
+					<int key="connectionID">848</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
-						<string key="label">contentDictionary: selection.value</string>
-						<reference key="source" ref="665074782"/>
+						<string key="label">value: arrangedObjects.key</string>
+						<reference key="source" ref="586867411"/>
 						<reference key="destination" ref="980977849"/>
 						<object class="NSNibBindingConnector" key="connector">
-							<reference key="NSSource" ref="665074782"/>
+							<reference key="NSSource" ref="586867411"/>
 							<reference key="NSDestination" ref="980977849"/>
-							<string key="NSLabel">contentDictionary: selection.value</string>
-							<string key="NSBinding">contentDictionary</string>
-							<string key="NSKeyPath">selection.value</string>
+							<string key="NSLabel">value: arrangedObjects.key</string>
+							<string key="NSBinding">value</string>
+							<string key="NSKeyPath">arrangedObjects.key</string>
 							<object class="NSDictionary" key="NSOptions">
 								<bool key="EncodedWithXMLCoder">YES</bool>
 								<object class="NSArray" key="dict.sortedKeys">
 									<bool key="EncodedWithXMLCoder">YES</bool>
+									<string>NSConditionallySetsEditable</string>
 									<string>NSValidatesImmediately</string>
-									<string>NSValueTransformerName</string>
 								</object>
-								<object class="NSMutableArray" key="dict.values">
+								<object class="NSArray" key="dict.values">
 									<bool key="EncodedWithXMLCoder">YES</bool>
+									<boolean value="NO"/>
 									<boolean value="YES"/>
-									<string>GroupMembersDictionaryTransformer</string>
 								</object>
 							</object>
 							<int key="NSNibBindingConnectorVersion">2</int>
 						</object>
 					</object>
-					<int key="connectionID">448</int>
+					<int key="connectionID">790</int>
 				</object>
 				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">add:</string>
-						<reference key="source" ref="665074782"/>
-						<reference key="destination" ref="566469435"/>
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">enabled: selection.active</string>
+						<reference key="source" ref="152999980"/>
+						<reference key="destination" ref="994230656"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="152999980"/>
+							<reference key="NSDestination" ref="994230656"/>
+							<string key="NSLabel">enabled: selection.active</string>
+							<string key="NSBinding">enabled</string>
+							<string key="NSKeyPath">selection.active</string>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
 					</object>
-					<int key="connectionID">457</int>
+					<int key="connectionID">841</int>
 				</object>
 				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">remove:</string>
-						<reference key="source" ref="665074782"/>
-						<reference key="destination" ref="911168208"/>
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">enabled: selection.active</string>
+						<reference key="source" ref="756082975"/>
+						<reference key="destination" ref="994230656"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="756082975"/>
+							<reference key="NSDestination" ref="994230656"/>
+							<string key="NSLabel">enabled: selection.active</string>
+							<string key="NSBinding">enabled</string>
+							<string key="NSKeyPath">selection.active</string>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
 					</object>
-					<int key="connectionID">458</int>
+					<int key="connectionID">838</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
-						<string key="label">value: values.syncDirectoryPath</string>
-						<reference key="source" ref="193312849"/>
-						<reference key="destination" ref="700105088"/>
+						<string key="label">enabled: selection.active</string>
+						<reference key="source" ref="716775631"/>
+						<reference key="destination" ref="994230656"/>
 						<object class="NSNibBindingConnector" key="connector">
-							<reference key="NSSource" ref="193312849"/>
-							<reference key="NSDestination" ref="700105088"/>
-							<string key="NSLabel">value: values.syncDirectoryPath</string>
-							<string key="NSBinding">value</string>
-							<string key="NSKeyPath">values.syncDirectoryPath</string>
-							<object class="NSDictionary" key="NSOptions">
-								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSArray" key="dict.sortedKeys">
-									<bool key="EncodedWithXMLCoder">YES</bool>
-									<string>NSValidatesImmediately</string>
-									<string>NSValueTransformerName</string>
-								</object>
-								<object class="NSMutableArray" key="dict.values">
-									<bool key="EncodedWithXMLCoder">YES</bool>
-									<boolean value="YES"/>
-									<string>DirPathFileURLTransformer</string>
-								</object>
-							</object>
+							<reference key="NSSource" ref="716775631"/>
+							<reference key="NSDestination" ref="994230656"/>
+							<string key="NSLabel">enabled: selection.active</string>
+							<string key="NSBinding">enabled</string>
+							<string key="NSKeyPath">selection.active</string>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">836</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">enabled: selection.active</string>
+						<reference key="source" ref="815622918"/>
+						<reference key="destination" ref="994230656"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="815622918"/>
+							<reference key="NSDestination" ref="994230656"/>
+							<string key="NSLabel">enabled: selection.active</string>
+							<string key="NSBinding">enabled</string>
+							<string key="NSKeyPath">selection.active</string>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">834</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">enabled: selection.active</string>
+						<reference key="source" ref="466584774"/>
+						<reference key="destination" ref="994230656"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="466584774"/>
+							<reference key="NSDestination" ref="994230656"/>
+							<string key="NSLabel">enabled: selection.active</string>
+							<string key="NSBinding">enabled</string>
+							<string key="NSKeyPath">selection.active</string>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">831</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">enabled: selection.active</string>
+						<reference key="source" ref="995829092"/>
+						<reference key="destination" ref="994230656"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="995829092"/>
+							<reference key="NSDestination" ref="994230656"/>
+							<string key="NSLabel">enabled: selection.active</string>
+							<string key="NSBinding">enabled</string>
+							<string key="NSKeyPath">selection.active</string>
 							<int key="NSNibBindingConnectorVersion">2</int>
 						</object>
 					</object>
-					<int key="connectionID">495</int>
+					<int key="connectionID">828</int>
 				</object>
 			</object>
 			<object class="IBMutableOrderedSet" key="objectRecords">
@@ -1536,7 +2130,9 @@
 					<bool key="EncodedWithXMLCoder">YES</bool>
 					<object class="IBObjectRecord">
 						<int key="objectID">0</int>
-						<reference key="object" ref="0"/>
+						<object class="NSArray" key="object" id="0">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+						</object>
 						<reference key="children" ref="1000"/>
 						<nil key="parent"/>
 					</object>
@@ -1559,480 +2155,622 @@
 						<string key="objectName">Application</string>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">3</int>
-						<reference key="object" ref="183740387"/>
+						<int key="objectID">3</int>
+						<reference key="object" ref="183740387"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="369507901"/>
+						</object>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">5</int>
+						<reference key="object" ref="369507901"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="419137310"/>
+							<reference ref="247568729"/>
+							<reference ref="287845150"/>
+							<reference ref="862152318"/>
+						</object>
+						<reference key="parent" ref="183740387"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">449</int>
+						<reference key="object" ref="894212860"/>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">484</int>
+						<reference key="object" ref="548435475"/>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">Non Empty String Formatter</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">505</int>
+						<reference key="object" ref="419137310"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="260212452"/>
+							<reference ref="366650902"/>
+							<reference ref="152792208"/>
+							<reference ref="310368570"/>
+						</object>
+						<reference key="parent" ref="369507901"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">506</int>
+						<reference key="object" ref="260212452"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="742841349"/>
+						</object>
+						<reference key="parent" ref="419137310"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">507</int>
+						<reference key="object" ref="366650902"/>
+						<reference key="parent" ref="419137310"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">508</int>
+						<reference key="object" ref="152792208"/>
+						<reference key="parent" ref="419137310"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">509</int>
+						<reference key="object" ref="310368570"/>
+						<reference key="parent" ref="419137310"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">510</int>
+						<reference key="object" ref="742841349"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="164109647"/>
-							<reference ref="369507901"/>
+							<reference ref="142142913"/>
 						</object>
-						<reference key="parent" ref="0"/>
+						<reference key="parent" ref="260212452"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">513</int>
+						<reference key="object" ref="142142913"/>
+						<reference key="parent" ref="742841349"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">4</int>
-						<reference key="object" ref="164109647"/>
+						<int key="objectID">524</int>
+						<reference key="object" ref="247568729"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="902282627"/>
-							<reference ref="1048882913"/>
+							<reference ref="277431414"/>
+							<reference ref="775611844"/>
+							<reference ref="239927411"/>
 						</object>
-						<reference key="parent" ref="183740387"/>
+						<reference key="parent" ref="369507901"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">5</int>
-						<reference key="object" ref="369507901"/>
+						<int key="objectID">525</int>
+						<reference key="object" ref="277431414"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="564742342"/>
+							<reference ref="646624756"/>
 						</object>
-						<reference key="parent" ref="183740387"/>
+						<reference key="parent" ref="247568729"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">6</int>
-						<reference key="object" ref="564742342"/>
+						<int key="objectID">526</int>
+						<reference key="object" ref="775611844"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="874188166"/>
-							<reference ref="939681372"/>
+							<reference ref="689284120"/>
 						</object>
-						<reference key="parent" ref="369507901"/>
+						<reference key="parent" ref="247568729"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">11</int>
-						<reference key="object" ref="874188166"/>
+						<int key="objectID">527</int>
+						<reference key="object" ref="689284120"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="865103585"/>
+							<reference ref="245911804"/>
+							<reference ref="312807152"/>
+							<reference ref="430121568"/>
+							<reference ref="915820146"/>
+							<reference ref="893175748"/>
 						</object>
-						<reference key="parent" ref="564742342"/>
+						<reference key="parent" ref="775611844"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">12</int>
-						<reference key="object" ref="865103585"/>
+						<int key="objectID">528</int>
+						<reference key="object" ref="646624756"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="883219248"/>
+							<reference ref="96425952"/>
+							<reference ref="1055886655"/>
+							<reference ref="571994001"/>
+							<reference ref="992895966"/>
+							<reference ref="287579732"/>
+							<reference ref="773004803"/>
 							<reference ref="507142965"/>
 							<reference ref="1017221490"/>
-							<reference ref="992895966"/>
-							<reference ref="701502029"/>
-							<reference ref="338834025"/>
-							<reference ref="379730869"/>
-							<reference ref="682758465"/>
-							<reference ref="1054241470"/>
-							<reference ref="892129196"/>
-							<reference ref="852692720"/>
-							<reference ref="193312849"/>
+							<reference ref="666198740"/>
+							<reference ref="750494034"/>
+							<reference ref="764785507"/>
 						</object>
-						<reference key="parent" ref="874188166"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">168</int>
-						<reference key="object" ref="902282627"/>
-						<reference key="parent" ref="164109647"/>
+						<reference key="parent" ref="277431414"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">169</int>
-						<reference key="object" ref="700105088"/>
-						<reference key="parent" ref="0"/>
+						<int key="objectID">529</int>
+						<reference key="object" ref="287845150"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="607694530"/>
+						</object>
+						<reference key="parent" ref="369507901"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">213</int>
-						<reference key="object" ref="1048882913"/>
-						<reference key="parent" ref="164109647"/>
+						<int key="objectID">530</int>
+						<reference key="object" ref="607694530"/>
+						<reference key="parent" ref="287845150"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">215</int>
-						<reference key="object" ref="939681372"/>
+						<int key="objectID">531</int>
+						<reference key="object" ref="862152318"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="646652655"/>
+							<reference ref="850026501"/>
 						</object>
-						<reference key="parent" ref="564742342"/>
+						<reference key="parent" ref="369507901"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">532</int>
+						<reference key="object" ref="850026501"/>
+						<reference key="parent" ref="862152318"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">216</int>
-						<reference key="object" ref="646652655"/>
+						<int key="objectID">533</int>
+						<reference key="object" ref="239927411"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="729122555"/>
-							<reference ref="988713632"/>
-							<reference ref="616473836"/>
-							<reference ref="1073611401"/>
-							<reference ref="566469435"/>
-							<reference ref="911168208"/>
-							<reference ref="724709226"/>
-							<reference ref="131074952"/>
-							<reference ref="202050240"/>
+							<reference ref="635100516"/>
 						</object>
-						<reference key="parent" ref="939681372"/>
+						<reference key="parent" ref="247568729"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">248</int>
-						<reference key="object" ref="724709226"/>
+						<int key="objectID">534</int>
+						<reference key="object" ref="635100516"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="992763544"/>
+							<reference ref="427907042"/>
+							<reference ref="377785255"/>
+							<reference ref="152999980"/>
+							<reference ref="756082975"/>
+							<reference ref="716775631"/>
+							<reference ref="815622918"/>
+							<reference ref="466584774"/>
+							<reference ref="995829092"/>
 						</object>
-						<reference key="parent" ref="646652655"/>
+						<reference key="parent" ref="239927411"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">249</int>
-						<reference key="object" ref="131074952"/>
+						<int key="objectID">543</int>
+						<reference key="object" ref="96425952"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="500680497"/>
+							<reference ref="34677607"/>
 						</object>
-						<reference key="parent" ref="646652655"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">250</int>
-						<reference key="object" ref="500680497"/>
-						<reference key="parent" ref="131074952"/>
+						<reference key="parent" ref="646624756"/>
+						<string key="objectName">Server</string>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">251</int>
-						<reference key="object" ref="992763544"/>
-						<reference key="parent" ref="724709226"/>
+						<int key="objectID">544</int>
+						<reference key="object" ref="34677607"/>
+						<reference key="parent" ref="96425952"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">280</int>
-						<reference key="object" ref="729122555"/>
+						<int key="objectID">547</int>
+						<reference key="object" ref="1055886655"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="30388460"/>
-							<reference ref="541110138"/>
-							<reference ref="750592955"/>
-							<reference ref="27951958"/>
+							<reference ref="9695847"/>
 						</object>
-						<reference key="parent" ref="646652655"/>
-						<string key="objectName">Scroll View - Table View - Metadata</string>
+						<reference key="parent" ref="646624756"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">548</int>
+						<reference key="object" ref="9695847"/>
+						<reference key="parent" ref="1055886655"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">281</int>
-						<reference key="object" ref="988713632"/>
+						<int key="objectID">323</int>
+						<reference key="object" ref="507142965"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="758066746"/>
+							<reference ref="993321662"/>
 						</object>
-						<reference key="parent" ref="646652655"/>
+						<reference key="parent" ref="646624756"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">338</int>
+						<reference key="object" ref="993321662"/>
+						<reference key="parent" ref="507142965"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">282</int>
-						<reference key="object" ref="616473836"/>
+						<int key="objectID">324</int>
+						<reference key="object" ref="1017221490"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="866246455"/>
+							<reference ref="1037784646"/>
 						</object>
-						<reference key="parent" ref="646652655"/>
+						<reference key="parent" ref="646624756"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">337</int>
+						<reference key="object" ref="1037784646"/>
+						<reference key="parent" ref="1017221490"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">283</int>
-						<reference key="object" ref="1073611401"/>
-						<reference key="parent" ref="646652655"/>
+						<int key="objectID">326</int>
+						<reference key="object" ref="992895966"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="784421446"/>
+						</object>
+						<reference key="parent" ref="646624756"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">284</int>
-						<reference key="object" ref="866246455"/>
-						<reference key="parent" ref="616473836"/>
+						<int key="objectID">335</int>
+						<reference key="object" ref="784421446"/>
+						<reference key="parent" ref="992895966"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">285</int>
-						<reference key="object" ref="758066746"/>
-						<reference key="parent" ref="988713632"/>
+						<int key="objectID">551</int>
+						<reference key="object" ref="571994001"/>
+						<reference key="parent" ref="646624756"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">286</int>
-						<reference key="object" ref="30388460"/>
+						<int key="objectID">552</int>
+						<reference key="object" ref="287579732"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="801247121"/>
+							<reference ref="1001750419"/>
 						</object>
-						<reference key="parent" ref="729122555"/>
+						<reference key="parent" ref="646624756"/>
+						<string key="objectName">User</string>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">287</int>
-						<reference key="object" ref="541110138"/>
-						<reference key="parent" ref="729122555"/>
+						<int key="objectID">553</int>
+						<reference key="object" ref="1001750419"/>
+						<reference key="parent" ref="287579732"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">288</int>
-						<reference key="object" ref="750592955"/>
-						<reference key="parent" ref="729122555"/>
+						<int key="objectID">554</int>
+						<reference key="object" ref="773004803"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="350801514"/>
+						</object>
+						<reference key="parent" ref="646624756"/>
+						<string key="objectName">Token</string>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">289</int>
-						<reference key="object" ref="27951958"/>
-						<reference key="parent" ref="729122555"/>
+						<int key="objectID">555</int>
+						<reference key="object" ref="350801514"/>
+						<reference key="parent" ref="773004803"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">291</int>
-						<reference key="object" ref="801247121"/>
+						<int key="objectID">556</int>
+						<reference key="object" ref="666198740"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="410705345"/>
+							<reference ref="269907300"/>
 						</object>
-						<reference key="parent" ref="30388460"/>
+						<reference key="parent" ref="646624756"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">292</int>
-						<reference key="object" ref="410705345"/>
-						<reference key="parent" ref="801247121"/>
+						<int key="objectID">557</int>
+						<reference key="object" ref="269907300"/>
+						<reference key="parent" ref="666198740"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">294</int>
-						<reference key="object" ref="566469435"/>
+						<int key="objectID">559</int>
+						<reference key="object" ref="750494034"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="452212524"/>
+							<reference ref="950873176"/>
 						</object>
-						<reference key="parent" ref="646652655"/>
+						<reference key="parent" ref="646624756"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">560</int>
+						<reference key="object" ref="950873176"/>
+						<reference key="parent" ref="750494034"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">433</int>
+						<reference key="object" ref="665074782"/>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">Dictionary Controller (Selected Group Members)</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">396</int>
+						<reference key="object" ref="980977849"/>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">Dictionary Controller (Groups)</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">625</int>
+						<reference key="object" ref="994230656"/>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">Array Controller (Accounts)</string>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">295</int>
-						<reference key="object" ref="911168208"/>
+						<int key="objectID">680</int>
+						<reference key="object" ref="764785507"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="860456214"/>
+							<reference ref="327493266"/>
 						</object>
-						<reference key="parent" ref="646652655"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">296</int>
-						<reference key="object" ref="860456214"/>
-						<reference key="parent" ref="911168208"/>
+						<reference key="parent" ref="646624756"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">297</int>
-						<reference key="object" ref="452212524"/>
-						<reference key="parent" ref="566469435"/>
+						<int key="objectID">681</int>
+						<reference key="object" ref="327493266"/>
+						<reference key="parent" ref="764785507"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">307</int>
-						<reference key="object" ref="883219248"/>
+						<int key="objectID">689</int>
+						<reference key="object" ref="312807152"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="899323867"/>
+							<reference ref="729917413"/>
 						</object>
-						<reference key="parent" ref="865103585"/>
+						<reference key="parent" ref="689284120"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">310</int>
-						<reference key="object" ref="899323867"/>
-						<reference key="parent" ref="883219248"/>
+						<int key="objectID">690</int>
+						<reference key="object" ref="729917413"/>
+						<reference key="parent" ref="312807152"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">323</int>
-						<reference key="object" ref="507142965"/>
+						<int key="objectID">691</int>
+						<reference key="object" ref="245911804"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="993321662"/>
+							<reference ref="708090355"/>
 						</object>
-						<reference key="parent" ref="865103585"/>
+						<reference key="parent" ref="689284120"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">324</int>
-						<reference key="object" ref="1017221490"/>
+						<int key="objectID">692</int>
+						<reference key="object" ref="708090355"/>
+						<reference key="parent" ref="245911804"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">702</int>
+						<reference key="object" ref="430121568"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="1037784646"/>
+							<reference ref="592322209"/>
 						</object>
-						<reference key="parent" ref="865103585"/>
+						<reference key="parent" ref="689284120"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">326</int>
-						<reference key="object" ref="992895966"/>
+						<int key="objectID">703</int>
+						<reference key="object" ref="915820146"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="784421446"/>
+							<reference ref="929820714"/>
 						</object>
-						<reference key="parent" ref="865103585"/>
+						<reference key="parent" ref="689284120"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">704</int>
+						<reference key="object" ref="929820714"/>
+						<reference key="parent" ref="915820146"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">327</int>
-						<reference key="object" ref="701502029"/>
-						<reference key="parent" ref="865103585"/>
+						<int key="objectID">705</int>
+						<reference key="object" ref="592322209"/>
+						<reference key="parent" ref="430121568"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">719</int>
+						<reference key="object" ref="893175748"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="768549799"/>
+						</object>
+						<reference key="parent" ref="689284120"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">328</int>
-						<reference key="object" ref="338834025"/>
-						<reference key="parent" ref="865103585"/>
-						<string key="objectName">Horizontal Line</string>
+						<int key="objectID">720</int>
+						<reference key="object" ref="768549799"/>
+						<reference key="parent" ref="893175748"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">329</int>
-						<reference key="object" ref="852692720"/>
+						<int key="objectID">722</int>
+						<reference key="object" ref="427907042"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="1023707124"/>
+							<reference ref="881351662"/>
+							<reference ref="94922151"/>
+							<reference ref="613407224"/>
+							<reference ref="199904301"/>
 						</object>
-						<reference key="parent" ref="865103585"/>
+						<reference key="parent" ref="635100516"/>
+						<string key="objectName">Scroll View - Table View - Metadata</string>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">330</int>
-						<reference key="object" ref="379730869"/>
+						<int key="objectID">723</int>
+						<reference key="object" ref="377785255"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="1043934785"/>
+							<reference ref="801276999"/>
+							<reference ref="79495429"/>
+							<reference ref="459733499"/>
+							<reference ref="176697034"/>
 						</object>
-						<reference key="parent" ref="865103585"/>
-						<string key="objectName">Content Encoding</string>
+						<reference key="parent" ref="635100516"/>
+						<string key="objectName">Scroll View - Table View - Metadata</string>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">331</int>
-						<reference key="object" ref="682758465"/>
+						<int key="objectID">724</int>
+						<reference key="object" ref="801276999"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="1042008644"/>
+							<reference ref="158961369"/>
 						</object>
-						<reference key="parent" ref="865103585"/>
-						<string key="objectName">Content Disposition</string>
+						<reference key="parent" ref="377785255"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">332</int>
-						<reference key="object" ref="1042008644"/>
-						<reference key="parent" ref="682758465"/>
+						<int key="objectID">725</int>
+						<reference key="object" ref="79495429"/>
+						<reference key="parent" ref="377785255"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">333</int>
-						<reference key="object" ref="1043934785"/>
-						<reference key="parent" ref="379730869"/>
+						<int key="objectID">726</int>
+						<reference key="object" ref="459733499"/>
+						<reference key="parent" ref="377785255"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">334</int>
-						<reference key="object" ref="1023707124"/>
-						<reference key="parent" ref="852692720"/>
+						<int key="objectID">727</int>
+						<reference key="object" ref="176697034"/>
+						<reference key="parent" ref="377785255"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">335</int>
-						<reference key="object" ref="784421446"/>
-						<reference key="parent" ref="992895966"/>
+						<int key="objectID">728</int>
+						<reference key="object" ref="158961369"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="573751375"/>
+						</object>
+						<reference key="parent" ref="801276999"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">337</int>
-						<reference key="object" ref="1037784646"/>
-						<reference key="parent" ref="1017221490"/>
+						<int key="objectID">729</int>
+						<reference key="object" ref="573751375"/>
+						<reference key="parent" ref="158961369"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">338</int>
-						<reference key="object" ref="993321662"/>
-						<reference key="parent" ref="507142965"/>
+						<int key="objectID">730</int>
+						<reference key="object" ref="881351662"/>
+						<reference key="parent" ref="427907042"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">343</int>
-						<reference key="object" ref="892129196"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="429867337"/>
-						</object>
-						<reference key="parent" ref="865103585"/>
+						<int key="objectID">731</int>
+						<reference key="object" ref="94922151"/>
+						<reference key="parent" ref="427907042"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">344</int>
-						<reference key="object" ref="429867337"/>
-						<reference key="parent" ref="892129196"/>
+						<int key="objectID">732</int>
+						<reference key="object" ref="613407224"/>
+						<reference key="parent" ref="427907042"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">340</int>
-						<reference key="object" ref="1054241470"/>
+						<int key="objectID">733</int>
+						<reference key="object" ref="199904301"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="482751693"/>
+							<reference ref="586867411"/>
 						</object>
-						<reference key="parent" ref="865103585"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">341</int>
-						<reference key="object" ref="482751693"/>
-						<reference key="parent" ref="1054241470"/>
+						<reference key="parent" ref="427907042"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">382</int>
-						<reference key="object" ref="202050240"/>
+						<int key="objectID">734</int>
+						<reference key="object" ref="586867411"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="817353191"/>
-							<reference ref="917463045"/>
-							<reference ref="529286880"/>
-							<reference ref="955904863"/>
+							<reference ref="233862147"/>
 						</object>
-						<reference key="parent" ref="646652655"/>
-						<string key="objectName">Scroll View - Table View - Metadata</string>
+						<reference key="parent" ref="199904301"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">383</int>
-						<reference key="object" ref="817353191"/>
-						<reference key="parent" ref="202050240"/>
+						<int key="objectID">735</int>
+						<reference key="object" ref="233862147"/>
+						<reference key="parent" ref="586867411"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">384</int>
-						<reference key="object" ref="917463045"/>
-						<reference key="parent" ref="202050240"/>
+						<int key="objectID">736</int>
+						<reference key="object" ref="152999980"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="863470950"/>
+						</object>
+						<reference key="parent" ref="635100516"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">385</int>
-						<reference key="object" ref="529286880"/>
-						<reference key="parent" ref="202050240"/>
+						<int key="objectID">737</int>
+						<reference key="object" ref="756082975"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="381359215"/>
+						</object>
+						<reference key="parent" ref="635100516"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">386</int>
-						<reference key="object" ref="955904863"/>
+						<int key="objectID">738</int>
+						<reference key="object" ref="716775631"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="604806618"/>
+							<reference ref="675243624"/>
 						</object>
-						<reference key="parent" ref="202050240"/>
+						<reference key="parent" ref="635100516"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">387</int>
-						<reference key="object" ref="604806618"/>
+						<int key="objectID">739</int>
+						<reference key="object" ref="815622918"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="809830821"/>
+							<reference ref="942965379"/>
 						</object>
-						<reference key="parent" ref="955904863"/>
+						<reference key="parent" ref="635100516"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">388</int>
-						<reference key="object" ref="809830821"/>
-						<reference key="parent" ref="604806618"/>
+						<int key="objectID">740</int>
+						<reference key="object" ref="942965379"/>
+						<reference key="parent" ref="815622918"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">396</int>
-						<reference key="object" ref="980977849"/>
-						<reference key="parent" ref="0"/>
-						<string key="objectName">Dictionary Controller (Groups)</string>
+						<int key="objectID">741</int>
+						<reference key="object" ref="675243624"/>
+						<reference key="parent" ref="716775631"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">433</int>
-						<reference key="object" ref="665074782"/>
-						<reference key="parent" ref="0"/>
-						<string key="objectName">Dictionary Controller (Selected Group Members)</string>
+						<int key="objectID">742</int>
+						<reference key="object" ref="381359215"/>
+						<reference key="parent" ref="756082975"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">449</int>
-						<reference key="object" ref="894212860"/>
-						<reference key="parent" ref="0"/>
+						<int key="objectID">743</int>
+						<reference key="object" ref="863470950"/>
+						<reference key="parent" ref="152999980"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">768</int>
+						<reference key="object" ref="466584774"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="683879656"/>
+						</object>
+						<reference key="parent" ref="635100516"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">470</int>
-						<reference key="object" ref="193312849"/>
+						<int key="objectID">769</int>
+						<reference key="object" ref="995829092"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="238772973"/>
+							<reference ref="402776801"/>
 						</object>
-						<reference key="parent" ref="865103585"/>
+						<reference key="parent" ref="635100516"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">471</int>
-						<reference key="object" ref="238772973"/>
-						<reference key="parent" ref="193312849"/>
+						<int key="objectID">770</int>
+						<reference key="object" ref="402776801"/>
+						<reference key="parent" ref="995829092"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">484</int>
-						<reference key="object" ref="548435475"/>
-						<reference key="parent" ref="0"/>
-						<string key="objectName">Non Empty String Formatter</string>
+						<int key="objectID">771</int>
+						<reference key="object" ref="683879656"/>
+						<reference key="parent" ref="466584774"/>
 					</object>
 				</object>
 			</object>
@@ -2043,91 +2781,117 @@
 					<string>-1.IBPluginDependency</string>
 					<string>-2.IBPluginDependency</string>
 					<string>-3.IBPluginDependency</string>
-					<string>11.IBPluginDependency</string>
-					<string>12.IBPluginDependency</string>
-					<string>168.IBPluginDependency</string>
-					<string>168.designableToolbarItemIdentifier</string>
-					<string>168.toolbarItem.selectable</string>
-					<string>169.IBPluginDependency</string>
-					<string>213.IBPluginDependency</string>
-					<string>213.designableToolbarItemIdentifier</string>
-					<string>213.toolbarItem.selectable</string>
-					<string>215.IBPluginDependency</string>
-					<string>216.IBPluginDependency</string>
-					<string>248.IBPluginDependency</string>
-					<string>249.IBPluginDependency</string>
-					<string>250.IBPluginDependency</string>
-					<string>251.IBPluginDependency</string>
-					<string>280.IBPluginDependency</string>
-					<string>281.IBPluginDependency</string>
-					<string>282.IBPluginDependency</string>
-					<string>283.IBPluginDependency</string>
-					<string>284.IBPluginDependency</string>
-					<string>285.IBPluginDependency</string>
-					<string>286.IBPluginDependency</string>
-					<string>287.IBPluginDependency</string>
-					<string>288.IBPluginDependency</string>
-					<string>289.IBPluginDependency</string>
-					<string>291.IBPluginDependency</string>
-					<string>292.IBPluginDependency</string>
-					<string>294.IBPluginDependency</string>
-					<string>295.IBPluginDependency</string>
-					<string>296.IBPluginDependency</string>
-					<string>297.IBPluginDependency</string>
 					<string>3.IBPluginDependency</string>
 					<string>3.IBWindowTemplateEditedContentRect</string>
 					<string>3.NSWindowTemplate.visibleAtLaunch</string>
-					<string>307.IBPluginDependency</string>
-					<string>310.IBPluginDependency</string>
 					<string>323.IBPluginDependency</string>
 					<string>324.IBPluginDependency</string>
 					<string>326.IBPluginDependency</string>
-					<string>327.IBPluginDependency</string>
-					<string>328.IBPluginDependency</string>
-					<string>329.IBPluginDependency</string>
-					<string>330.IBPluginDependency</string>
-					<string>331.IBPluginDependency</string>
-					<string>332.IBPluginDependency</string>
-					<string>333.IBPluginDependency</string>
-					<string>334.IBPluginDependency</string>
 					<string>335.IBPluginDependency</string>
 					<string>337.IBPluginDependency</string>
 					<string>338.IBPluginDependency</string>
-					<string>340.IBPluginDependency</string>
-					<string>341.IBPluginDependency</string>
-					<string>343.IBPluginDependency</string>
-					<string>344.IBPluginDependency</string>
-					<string>382.IBPluginDependency</string>
-					<string>383.IBPluginDependency</string>
-					<string>384.IBPluginDependency</string>
-					<string>385.IBPluginDependency</string>
-					<string>386.IBPluginDependency</string>
-					<string>387.IBPluginDependency</string>
-					<string>388.IBPluginDependency</string>
 					<string>396.IBPluginDependency</string>
-					<string>4.IBPluginDependency</string>
 					<string>433.IBPluginDependency</string>
 					<string>449.IBPluginDependency</string>
-					<string>470.IBPluginDependency</string>
-					<string>471.IBPluginDependency</string>
 					<string>484.IBPluginDependency</string>
 					<string>5.IBPluginDependency</string>
-					<string>6.IBPluginDependency</string>
+					<string>505.IBPluginDependency</string>
+					<string>506.IBPluginDependency</string>
+					<string>507.IBPluginDependency</string>
+					<string>508.IBPluginDependency</string>
+					<string>509.IBPluginDependency</string>
+					<string>510.IBPluginDependency</string>
+					<string>513.IBPluginDependency</string>
+					<string>524.IBPluginDependency</string>
+					<string>525.IBPluginDependency</string>
+					<string>526.IBPluginDependency</string>
+					<string>527.IBPluginDependency</string>
+					<string>528.IBPluginDependency</string>
+					<string>529.IBPluginDependency</string>
+					<string>530.IBPluginDependency</string>
+					<string>531.IBPluginDependency</string>
+					<string>532.IBPluginDependency</string>
+					<string>533.IBPluginDependency</string>
+					<string>534.IBPluginDependency</string>
+					<string>543.IBPluginDependency</string>
+					<string>544.IBPluginDependency</string>
+					<string>547.IBPluginDependency</string>
+					<string>548.IBPluginDependency</string>
+					<string>551.IBPluginDependency</string>
+					<string>552.IBPluginDependency</string>
+					<string>553.IBPluginDependency</string>
+					<string>554.IBPluginDependency</string>
+					<string>555.IBPluginDependency</string>
+					<string>556.IBPluginDependency</string>
+					<string>557.IBPluginDependency</string>
+					<string>559.IBPluginDependency</string>
+					<string>560.IBPluginDependency</string>
+					<string>625.IBPluginDependency</string>
+					<string>680.IBPluginDependency</string>
+					<string>681.IBPluginDependency</string>
+					<string>689.IBPluginDependency</string>
+					<string>690.IBPathControlIntegration.allowedTypes</string>
+					<string>690.IBPluginDependency</string>
+					<string>691.IBPluginDependency</string>
+					<string>692.IBPluginDependency</string>
+					<string>702.IBPluginDependency</string>
+					<string>703.IBPluginDependency</string>
+					<string>704.IBPluginDependency</string>
+					<string>705.IBPluginDependency</string>
+					<string>719.IBPluginDependency</string>
+					<string>720.IBPluginDependency</string>
+					<string>722.IBPluginDependency</string>
+					<string>723.IBPluginDependency</string>
+					<string>724.IBPluginDependency</string>
+					<string>725.IBPluginDependency</string>
+					<string>726.IBPluginDependency</string>
+					<string>727.IBPluginDependency</string>
+					<string>728.IBPluginDependency</string>
+					<string>729.IBPluginDependency</string>
+					<string>730.IBPluginDependency</string>
+					<string>731.IBPluginDependency</string>
+					<string>732.IBPluginDependency</string>
+					<string>733.IBPluginDependency</string>
+					<string>734.IBPluginDependency</string>
+					<string>735.IBPluginDependency</string>
+					<string>736.IBPluginDependency</string>
+					<string>737.IBPluginDependency</string>
+					<string>738.IBPluginDependency</string>
+					<string>739.IBPluginDependency</string>
+					<string>740.IBPluginDependency</string>
+					<string>741.IBPluginDependency</string>
+					<string>742.IBPluginDependency</string>
+					<string>743.IBPluginDependency</string>
+					<string>768.IBPluginDependency</string>
+					<string>769.IBPluginDependency</string>
+					<string>770.IBPluginDependency</string>
+					<string>771.IBPluginDependency</string>
 				</object>
-				<object class="NSMutableArray" key="dict.values">
+				<object class="NSArray" key="dict.values">
 					<bool key="EncodedWithXMLCoder">YES</bool>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>{{438, 560}, {520, 345}}</string>
+					<boolean value="NO"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<string>0</string>
-					<boolean value="YES"/>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<string>1</string>
-					<boolean value="YES"/>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -2151,14 +2915,18 @@
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<string>{{438, 560}, {520, 345}}</string>
-					<boolean value="NO"/>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="22221536"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -2203,9 +2971,285 @@
 				<reference key="dict.values" ref="0"/>
 			</object>
 			<nil key="sourceID"/>
-			<int key="maxID">495</int>
+			<int key="maxID">865</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">GroupAndGroupMemberFormatter</string>
+					<string key="superclassName">NSFormatter</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./Classes/GroupAndGroupMemberFormatter.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NonEmptyStringFormatter</string>
+					<string key="superclassName">NSFormatter</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./Classes/NonEmptyStringFormatter.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">PithosBrowserController</string>
+					<string key="superclassName">NSWindowController</string>
+					<object class="NSMutableDictionary" key="actions">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>forceRefresh:</string>
+							<string>refresh:</string>
+						</object>
+						<object class="NSArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>id</string>
+							<string>id</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="actionInfosByName">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>forceRefresh:</string>
+							<string>refresh:</string>
+						</object>
+						<object class="NSArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBActionInfo">
+								<string key="name">forceRefresh:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">refresh:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="outlets">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>activityProgressIndicator</string>
+							<string>activityTextField</string>
+							<string>browser</string>
+							<string>browserMenu</string>
+							<string>horizontalSplitView</string>
+							<string>leftBottomView</string>
+							<string>leftTopView</string>
+							<string>outlineView</string>
+							<string>outlineViewMenu</string>
+							<string>verticalSplitView</string>
+						</object>
+						<object class="NSArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>NSProgressIndicator</string>
+							<string>NSTextField</string>
+							<string>NSBrowser</string>
+							<string>NSMenu</string>
+							<string>NSSplitView</string>
+							<string>NSView</string>
+							<string>NSView</string>
+							<string>NSOutlineView</string>
+							<string>NSMenu</string>
+							<string>NSSplitView</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="toOneOutletInfosByName">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>activityProgressIndicator</string>
+							<string>activityTextField</string>
+							<string>browser</string>
+							<string>browserMenu</string>
+							<string>horizontalSplitView</string>
+							<string>leftBottomView</string>
+							<string>leftTopView</string>
+							<string>outlineView</string>
+							<string>outlineViewMenu</string>
+							<string>verticalSplitView</string>
+						</object>
+						<object class="NSArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBToOneOutletInfo">
+								<string key="name">activityProgressIndicator</string>
+								<string key="candidateClassName">NSProgressIndicator</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">activityTextField</string>
+								<string key="candidateClassName">NSTextField</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">browser</string>
+								<string key="candidateClassName">NSBrowser</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">browserMenu</string>
+								<string key="candidateClassName">NSMenu</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">horizontalSplitView</string>
+								<string key="candidateClassName">NSSplitView</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">leftBottomView</string>
+								<string key="candidateClassName">NSView</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">leftTopView</string>
+								<string key="candidateClassName">NSView</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">outlineView</string>
+								<string key="candidateClassName">NSOutlineView</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">outlineViewMenu</string>
+								<string key="candidateClassName">NSMenu</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">verticalSplitView</string>
+								<string key="candidateClassName">NSSplitView</string>
+							</object>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./Classes/PithosBrowserController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">PithosPreferencesController</string>
+					<string key="superclassName">NSWindowController</string>
+					<object class="NSMutableDictionary" key="actions">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>addAccount:</string>
+							<string>groupsApply:</string>
+							<string>groupsRevert:</string>
+							<string>login:</string>
+							<string>loginCancel:</string>
+							<string>removeAccount:</string>
+							<string>syncApply:</string>
+							<string>syncCancel:</string>
+						</object>
+						<object class="NSArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="actionInfosByName">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>addAccount:</string>
+							<string>groupsApply:</string>
+							<string>groupsRevert:</string>
+							<string>login:</string>
+							<string>loginCancel:</string>
+							<string>removeAccount:</string>
+							<string>syncApply:</string>
+							<string>syncCancel:</string>
+						</object>
+						<object class="NSArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBActionInfo">
+								<string key="name">addAccount:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">groupsApply:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">groupsRevert:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">login:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">loginCancel:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">removeAccount:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">syncApply:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">syncCancel:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="outlets">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>accountsArrayController</string>
+							<string>groupsDictionaryController</string>
+							<string>pithosBrowserController</string>
+							<string>selectedGroupMembersDictionaryController</string>
+						</object>
+						<object class="NSArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>NSArrayController</string>
+							<string>NSDictionaryController</string>
+							<string>PithosBrowserController</string>
+							<string>NSDictionaryController</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="toOneOutletInfosByName">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>accountsArrayController</string>
+							<string>groupsDictionaryController</string>
+							<string>pithosBrowserController</string>
+							<string>selectedGroupMembersDictionaryController</string>
+						</object>
+						<object class="NSArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBToOneOutletInfo">
+								<string key="name">accountsArrayController</string>
+								<string key="candidateClassName">NSArrayController</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">groupsDictionaryController</string>
+								<string key="candidateClassName">NSDictionaryController</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">pithosBrowserController</string>
+								<string key="candidateClassName">PithosBrowserController</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">selectedGroupMembersDictionaryController</string>
+								<string key="candidateClassName">NSDictionaryController</string>
+							</object>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./Classes/PithosPreferencesController.h</string>
+					</object>
+				</object>
+			</object>
 		</object>
-		<object class="IBClassDescriber" key="IBDocument.Classes"/>
 		<int key="IBDocument.localizationMode">0</int>
 		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
 		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
@@ -2219,16 +3263,12 @@
 			<object class="NSArray" key="dict.sortedKeys">
 				<bool key="EncodedWithXMLCoder">YES</bool>
 				<string>NSAddTemplate</string>
-				<string>NSEveryone</string>
-				<string>NSPreferencesGeneral</string>
 				<string>NSRemoveTemplate</string>
 				<string>NSSwitch</string>
 			</object>
-			<object class="NSMutableArray" key="dict.values">
+			<object class="NSArray" key="dict.values">
 				<bool key="EncodedWithXMLCoder">YES</bool>
 				<string>{8, 8}</string>
-				<string>{32, 32}</string>
-				<string>{32, 32}</string>
 				<string>{8, 8}</string>
 				<string>{15, 15}</string>
 			</object>
diff --git a/pithos-macos/PithosSharingAccountsNode.m b/pithos-macos/PithosSharingAccountsNode.m
index 5b738b0..39d902c 100644
--- a/pithos-macos/PithosSharingAccountsNode.m
+++ b/pithos-macos/PithosSharingAccountsNode.m
@@ -69,6 +69,15 @@
 #pragma mark -
 #pragma mark Properties
 
+- (void)setPithos:(ASIPithos *)aPithos {
+    if (aPithos && ![aPithos isEqualTo:pithos]) {
+        [pithos release];
+        pithos = [aPithos retain];
+        [url release];
+        url = nil;
+    }
+}
+
 - (NSString *)url {
     if (url == nil) 
         url = [pithos.storageURLPrefix copy];
diff --git a/pithos-macos/PithosSubdirNode.m b/pithos-macos/PithosSubdirNode.m
index c07e3af..c8175c7 100644
--- a/pithos-macos/PithosSubdirNode.m
+++ b/pithos-macos/PithosSubdirNode.m
@@ -41,6 +41,7 @@
 #import "ASIPithosObjectRequest.h"
 #import "ASIPithosContainer.h"
 #import "ASIPithosObject.h"
+#import "ASINetworkQueue.h"
 #import "ASIDownloadCache.h"
 #import "PithosUtilities.h"
 #import "PithosObjectNodeInfoController.h"
@@ -84,6 +85,15 @@ static NSImage *sharedIcon = nil;
 #pragma mark -
 #pragma mark Properties
 
+- (void)setPithos:(ASIPithos *)aPithos {
+    if (aPithos && ![aPithos isEqualTo:pithos]) {
+        [pithos release];
+        pithos = [aPithos retain];
+        [url release];
+        url = nil;
+    }
+}
+
 - (NSString *)url {
     if (url == nil)
         url = [[NSString alloc] initWithFormat:@"subdir %@/%@/%@%@", 
@@ -167,17 +177,39 @@ static NSImage *sharedIcon = nil;
 
 - (void)objectRequestFailed:(ASIPithosObjectRequest *)request {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    if ([request isEqualTo:applyMetadataObjectRequest]) {
-        [PithosUtilities httpRequestErrorAlertWithRequest:applyMetadataObjectRequest];
-        @synchronized(self) {
-            [applyMetadataObjectRequest release];
-            applyMetadataObjectRequest = nil;
+    NSUInteger retries = [[request.userInfo objectForKey:@"retries"] unsignedIntegerValue];
+    if (retries > 0) {
+        ASIPithosObjectRequest *newRequest = (ASIPithosObjectRequest *)[PithosUtilities copyRequest:request];
+        [(NSMutableDictionary *)(newRequest.userInfo)setObject:[NSNumber numberWithUnsignedInteger:(--retries)] forKey:@"retries"];
+        if ([request isEqualTo:applyMetadataObjectRequest]) {
+            @synchronized(self) {
+                [applyMetadataObjectRequest release];
+                applyMetadataObjectRequest = newRequest;
+            }
+        } else if ([request isEqualTo:refreshMetadataObjectRequest]) {
+            @synchronized(self) {
+                [refreshMetadataObjectRequest release];
+                refreshMetadataObjectRequest = newRequest;
+            }
         }
-    } else if ([request isEqualTo:refreshMetadataObjectRequest]) {
-        [PithosUtilities httpRequestErrorAlertWithRequest:refreshMetadataObjectRequest];
-        @synchronized(self) {
-            [refreshMetadataObjectRequest release];
-            refreshMetadataObjectRequest = nil;
+        [[PithosUtilities prepareRequest:newRequest priority:[[newRequest.userInfo objectForKey:@"priority"] integerValue]] startAsynchronous];
+    } else {
+        if ([request isEqualTo:applyMetadataObjectRequest]) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [PithosUtilities httpRequestErrorAlertWithRequest:applyMetadataObjectRequest];
+            });
+            @synchronized(self) {
+                [applyMetadataObjectRequest release];
+                applyMetadataObjectRequest = nil;
+            }
+        } else if ([request isEqualTo:refreshMetadataObjectRequest]) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [PithosUtilities httpRequestErrorAlertWithRequest:refreshMetadataObjectRequest];
+            });
+            @synchronized(self) {
+                [refreshMetadataObjectRequest release];
+                refreshMetadataObjectRequest = nil;
+            }
         }
     }
     [pool drain];
@@ -195,10 +227,9 @@ static NSImage *sharedIcon = nil;
                 ASIPithosObjectRequest *request = [ASIPithosObjectRequest objectMetadataRequestWithPithos:pithos 
                                                                                             containerName:pithosContainer.name 
                                                                                                objectName:prefix];
-                [[PithosUtilities prepareRequest:request] startAsynchronous];
-                while (![request isFinished]) {
-                    usleep(1);
-                }
+                ASINetworkQueue *networkQueue = [ASINetworkQueue queue];
+                [networkQueue go];
+                [networkQueue addOperations:[NSArray arrayWithObject:[PithosUtilities prepareRequest:request]] waitUntilFinished:YES];
                 if ([request error]) {
                     alert = [[[NSAlert alloc] init] autorelease];
                     [alert setMessageText:@"HTTP Request Error"];
@@ -217,10 +248,9 @@ static NSImage *sharedIcon = nil;
                         request = [ASIPithosObjectRequest deleteObjectRequestWithPithos:pithos 
                                                                           containerName:pithosContainer.name 
                                                                              objectName:prefix];
-                        [[PithosUtilities prepareRequest:request] startAsynchronous];
-                        while (![request isFinished]) {
-                            usleep(1);
-                        }
+                        ASINetworkQueue *networkQueue = [ASINetworkQueue queue];
+                        [networkQueue go];
+                        [networkQueue addOperations:[NSArray arrayWithObject:[PithosUtilities prepareRequest:request]] waitUntilFinished:YES];
                         if ([request error]) {
                             alert = [[[NSAlert alloc] init] autorelease];
                             [alert setMessageText:@"HTTP Request Error"];
diff --git a/pithos-macos/PithosSyncDaemon.h b/pithos-macos/PithosSyncDaemon.h
index 9492c3a..4c60618 100644
--- a/pithos-macos/PithosSyncDaemon.h
+++ b/pithos-macos/PithosSyncDaemon.h
@@ -36,15 +36,16 @@
 // or implied, of GRNET S.A.
 
 #import <Foundation/Foundation.h>
+@class PithosAccount;
 @class ASIPithos;
 @class PithosActivityFacility;
 @class ASINetworkQueue;
 
 @interface PithosSyncDaemon : NSObject {
     NSString *directoryPath;
-    ASIPithos *pithos;
+    PithosAccount *pithosAccount;
     NSString *containerName;
-    NSTimeInterval timeInterval;
+    ASIPithos *pithos;
 
     NSString *blockHash;
     NSUInteger blockSize;
@@ -59,18 +60,25 @@
     NSString *tempDownloadsDirPath;
     NSString *tempTrashDirPath;
     
+    BOOL daemonActive;
+    
     NSUInteger syncOperationCount;
     BOOL newSyncRequested;
     NSDate *lastCompletedSync;
     BOOL syncIncomplete;
+    BOOL syncLate;
     
     ASINetworkQueue *networkQueue;
-    dispatch_queue_t queue;
-    NSTimer *timer;
+    NSOperationQueue *callbackQueue;
     
     PithosActivityFacility *activityFacility;
 }
 
+@property (nonatomic, retain) NSString *directoryPath;
+@property (nonatomic, retain) PithosAccount *pithosAccount;
+@property (nonatomic, retain) NSString *containerName;
+@property (nonatomic, retain) ASIPithos *pithos;
+
 @property (nonatomic, retain) NSString *blockHash;
 @property (nonatomic, assign) NSUInteger blockSize;
 @property (nonatomic, retain) NSDate *lastModified;
@@ -78,8 +86,7 @@
 @property (nonatomic, retain) NSMutableDictionary *storedLocalObjectStates;
 @property (nonatomic, retain) NSMutableDictionary *currentLocalObjectStates;
 
-@property (nonatomic, readonly) NSString *directoryPath;
-@property (nonatomic, readonly) NSString *containerDirectoryPath;
+@property (nonatomic, retain) NSString *containerDirectoryPath;
 @property (nonatomic, readonly) NSString *pithosStateFilePath;
 @property (nonatomic, readonly) NSString *tempDownloadsDirPath;
 @property (nonatomic, readonly) NSString *tempTrashDirPath;
@@ -87,10 +94,15 @@
 @property (nonatomic, retain) NSDate *lastCompletedSync;
 
 - (id)initWithDirectoryPath:(NSString *)aDirectoryPath 
-                     pithos:(ASIPithos *)aPithos 
+              pithosAccount:(PithosAccount *)aPithosAccount 
               containerName:(NSString *)aContainerName 
-               timeInterval:(NSTimeInterval)aTimeInterval 
             resetLocalState:(BOOL)resetLocalState;
+
+- (void)resetDaemon;
+- (void)startDaemon;
+
 - (void)sync;
+- (BOOL)isSyncing;
+- (void)syncLate;
 
 @end
diff --git a/pithos-macos/PithosSyncDaemon.m b/pithos-macos/PithosSyncDaemon.m
index 5366cd6..81efa3c 100644
--- a/pithos-macos/PithosSyncDaemon.m
+++ b/pithos-macos/PithosSyncDaemon.m
@@ -36,6 +36,7 @@
 // or implied, of GRNET S.A.
 
 #import "PithosSyncDaemon.h"
+#import "PithosAccount.h"
 #import "PithosLocalObjectState.h"
 #import "PithosActivityFacility.h"
 #import "PithosUtilities.h"
@@ -47,6 +48,7 @@
 #import "ASIPithosObject.h"
 
 @interface PithosSyncDaemon (Private)
+- (void)resetLocalState;
 - (NSString *)pithosStateFilePath;
 - (void)saveLocalState;
 
@@ -58,99 +60,141 @@
 - (void)updateServerStateWithCurrentState:(PithosLocalObjectState *)currentState 
                                    object:(ASIPithosObject *)object 
                             localFilePath:(NSString *)filePath;
+- (void)listRequestFailed:(ASIPithosContainerRequest *)containerRequest;
 - (void)requestFailed:(ASIPithosRequest *)request;
 
-- (void)increaseSyncOperationCount;
-- (void)decreaseSyncOperationCount;
+- (void)syncOperationStarted;
+- (void)syncOperationFinishedWithSuccess:(BOOL)operationSuccessfull;
 
 @end
 
 @implementation PithosSyncDaemon
+@synthesize directoryPath, pithosAccount, containerName, pithos;
 @synthesize blockHash, blockSize, lastModified, lastCompletedSync, remoteObjects, storedLocalObjectStates, currentLocalObjectStates;
-@synthesize directoryPath, containerDirectoryPath, pithosStateFilePath, tempDownloadsDirPath, tempTrashDirPath;
+@synthesize containerDirectoryPath, pithosStateFilePath, tempDownloadsDirPath, tempTrashDirPath;
 
 #pragma mark -
 #pragma Object Lifecycle
 
 - (id)initWithDirectoryPath:(NSString *)aDirectoryPath 
-                     pithos:(ASIPithos *)aPithos 
+              pithosAccount:(PithosAccount *)aPithosAccount 
               containerName:(NSString *)aContainerName 
-               timeInterval:(NSTimeInterval)aTimeInterval 
             resetLocalState:(BOOL)resetLocalState {
     if ((self = [super init])) {
         directoryPath = [aDirectoryPath copy];
-        pithos = [aPithos retain];
+        pithosAccount = [aPithosAccount retain];
         containerName = [aContainerName copy];
-        timeInterval = aTimeInterval;
-        
-        syncOperationCount = 0;
-        newSyncRequested = NO;
-        containerDirectoryPath = [[directoryPath stringByAppendingPathComponent:containerName] copy];
+        self.pithos = pithosAccount.pithos;
         
         activityFacility = [PithosActivityFacility defaultPithosActivityFacility];
         
-        NSFileManager *fileManager = [NSFileManager defaultManager];
-        if (resetLocalState) {
-            NSError *error = nil;
-            if ([fileManager fileExistsAtPath:self.pithosStateFilePath] && 
-                (![fileManager removeItemAtPath:self.pithosStateFilePath error:&error] || error))
-                [PithosUtilities fileActionFailedAlertWithTitle:@"Remove File Error" 
-                                                        message:[NSString stringWithFormat:@"Cannot remove file at '%@'", self.pithosStateFilePath] 
-                                                          error:error];
-            if (self.tempDownloadsDirPath) {
-                error = nil;
-                for (NSString *subPath in [fileManager contentsOfDirectoryAtPath:self.tempDownloadsDirPath error:&error]) {
-                    if (error) {
-                        [PithosUtilities fileActionFailedAlertWithTitle:@"Directory Contents Error" 
-                                                                message:[NSString stringWithFormat:@"Cannot get contents of directory at '%@'", self.tempDownloadsDirPath] 
-                                                                  error:error];
-                        break;
-                    }
-                    NSString *subFilePath = [self.tempDownloadsDirPath stringByAppendingPathComponent:subPath];
-                    if (![fileManager removeItemAtPath:subFilePath error:&error] || error) {
-                        [PithosUtilities fileActionFailedAlertWithTitle:@"Remove File Error" 
-                                                                message:[NSString stringWithFormat:@"Cannot remove file at '%@'", subFilePath] 
-                                                                  error:error];
-                    }
-                    error = nil;
-                }
-            }
-        }
-        if ([[NSFileManager defaultManager] fileExistsAtPath:self.pithosStateFilePath]) {
-            NSData *data = [NSData dataWithContentsOfFile:self.pithosStateFilePath];
-            NSKeyedUnarchiver *unarchiver = [[[NSKeyedUnarchiver alloc] initForReadingWithData:data] autorelease];
-            self.storedLocalObjectStates = [unarchiver decodeObjectForKey:containerName];
-            [unarchiver finishDecoding];
-        } else {
-            self.storedLocalObjectStates = [NSMutableDictionary dictionary];
-        }
+        if (resetLocalState)
+            [self resetLocalState];
         
         networkQueue = [[ASINetworkQueue alloc] init];
         networkQueue.showAccurateProgress = YES;
         networkQueue.shouldCancelAllRequestsOnFailure = NO;
-        [networkQueue go];
+//        networkQueue.maxConcurrentOperationCount = 1;
         
-        queue = dispatch_queue_create("gr.grnet.pithos.SyncQueue", NULL);
+        callbackQueue = [[NSOperationQueue alloc] init];
+        [callbackQueue setSuspended:YES];
+        callbackQueue.name = [NSString stringWithFormat:@"gr.grnet.pithos.SyncCallbackQueue.%@", pithosAccount.uniqueName];
+//        callbackQueue.maxConcurrentOperationCount = 1;
         
         [[NSNotificationCenter defaultCenter] addObserver:self
                                                  selector:@selector(applicationWillTerminate:)
                                                      name:NSApplicationWillTerminateNotification
                                                    object:[NSApplication sharedApplication]];
+        
+        [self startDaemon];
+    }
+    return self;
+}
+
+- (void)resetLocalState {
+    self.lastCompletedSync = nil;
+    NSFileManager *fileManager = [NSFileManager defaultManager];
+    NSError *error = nil;
+    if ([fileManager fileExistsAtPath:self.pithosStateFilePath] && 
+        (![fileManager removeItemAtPath:self.pithosStateFilePath error:&error] || error))
+        [PithosUtilities fileActionFailedAlertWithTitle:@"Remove File Error" 
+                                                message:[NSString stringWithFormat:@"Cannot remove file at '%@'", self.pithosStateFilePath] 
+                                                  error:error];
+    if (self.tempDownloadsDirPath) {
+        error = nil;
+        for (NSString *subPath in [fileManager contentsOfDirectoryAtPath:self.tempDownloadsDirPath error:&error]) {
+            if (error) {
+                [PithosUtilities fileActionFailedAlertWithTitle:@"Directory Contents Error" 
+                                                        message:[NSString stringWithFormat:@"Cannot get contents of directory at '%@'", self.tempDownloadsDirPath] 
+                                                          error:error];
+                break;
+            }
+            NSString *subFilePath = [self.tempDownloadsDirPath stringByAppendingPathComponent:subPath];
+            if (![fileManager removeItemAtPath:subFilePath error:&error] || error) {
+                [PithosUtilities fileActionFailedAlertWithTitle:@"Remove File Error" 
+                                                        message:[NSString stringWithFormat:@"Cannot remove file at '%@'", subFilePath] 
+                                                          error:error];
+            }
+            error = nil;
+        }
+    }
+}
+
+- (void)resetDaemon {
+    @synchronized(self) {
+        if (!daemonActive)
+            return;
+    }
     
-        timer = [[NSTimer scheduledTimerWithTimeInterval:timeInterval target:self selector:@selector(sync) userInfo:nil repeats:YES] retain];
-        [timer fire];
+    [networkQueue reset];
+    [callbackQueue cancelAllOperations];
+    [callbackQueue setSuspended:YES];
+    [self emptyTempTrash];
+    
+    @synchronized(self) {            
+        daemonActive = NO;
+    }
+}
+
+- (void)startDaemon {
+    @synchronized(self) {
+        if (daemonActive)
+            return;
     }
     
-    return self;
+    syncOperationCount = 0;
+    newSyncRequested = NO;
+    syncIncomplete = NO;
+    syncLate = NO;
+
+    self.containerDirectoryPath = [directoryPath stringByAppendingPathComponent:containerName];
+            
+    if ([[NSFileManager defaultManager] fileExistsAtPath:self.pithosStateFilePath]) {
+        NSData *data = [NSData dataWithContentsOfFile:self.pithosStateFilePath];
+        NSKeyedUnarchiver *unarchiver = [[[NSKeyedUnarchiver alloc] initForReadingWithData:data] autorelease];
+        self.storedLocalObjectStates = [unarchiver decodeObjectForKey:containerName];
+        [unarchiver finishDecoding];
+    } else {
+        self.storedLocalObjectStates = [NSMutableDictionary dictionary];
+    }
+
+    // In the improbable case of leftover operations
+    [networkQueue reset];
+    [callbackQueue cancelAllOperations];
+    
+    [networkQueue go];
+    [callbackQueue setSuspended:NO];
+    
+    @synchronized(self) {
+        daemonActive = YES;
+    }
 }
 
 - (void)dealloc {
     [[NSNotificationCenter defaultCenter] removeObserver:self];
-    dispatch_release(queue);
-    [networkQueue cancelAllOperations];
+    [self resetDaemon];
+    [callbackQueue release];
     [networkQueue release];
-    [timer invalidate];
-    [timer release];
     [tempTrashDirPath release];
     [tempDownloadsDirPath release];
     [pithosStateFilePath release];
@@ -162,8 +206,9 @@
     [lastCompletedSync release];
     [lastModified release];
     [blockHash release];
-    [containerName release];
     [pithos release];
+    [containerName release];
+    [pithosAccount release];
     [directoryPath release];
     [super dealloc];
 }
@@ -182,82 +227,94 @@
     if (!pithosStateFilePath)
         pithosStateFilePath = [[[[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0] 
                                  stringByAppendingPathComponent:[[NSBundle mainBundle] bundleIdentifier]] 
-                                stringByAppendingPathComponent:@"PithosLocalObjectStates.archive"] retain];
+                                stringByAppendingPathComponent:[NSString stringWithFormat:@"%@-PithosLocalObjectStates.archive", 
+                                                                pithosAccount.uniqueName]] retain];
     return [[pithosStateFilePath copy] autorelease];
 }
 
 - (NSString *)tempDownloadsDirPath {
-    NSFileManager *fileManager = [NSFileManager defaultManager];
-    if (!tempDownloadsDirPath || ![fileManager fileExistsAtPath:tempDownloadsDirPath]) {
-        // Get the path from user defaults
-        NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
-        tempDownloadsDirPath = [userDefaults stringForKey:@"PithosSyncTempDownloadsDirPath"];
-        if (tempDownloadsDirPath) {
-            // Check if the path exists
-            BOOL isDirectory;
-            BOOL fileExists = [fileManager fileExistsAtPath:tempDownloadsDirPath isDirectory:&isDirectory];
-            NSError *error = nil;
-            if (fileExists && !isDirectory)
-                [fileManager removeItemAtPath:tempDownloadsDirPath error:&error];
-            if (!error & !fileExists)
-                [fileManager createDirectoryAtPath:tempDownloadsDirPath withIntermediateDirectories:YES attributes:nil error:&error];
-            if (error)
-                tempDownloadsDirPath = nil;
-        }
-        if (!tempDownloadsDirPath) {
-            NSString *tempDirTemplate = [[[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0] 
-                                          stringByAppendingPathComponent:[[NSBundle mainBundle] bundleIdentifier]] 
-                                         stringByAppendingPathComponent:@"Temp Downloads XXXXXX"];
-            const char *tempDirTemplateCString = [tempDirTemplate fileSystemRepresentation];
-            char *tempDirNameCString = (char *)malloc(strlen(tempDirTemplateCString) + 1);
-            strcpy(tempDirNameCString, tempDirTemplateCString);
-            tempDirNameCString = mkdtemp(tempDirNameCString);
-            if (tempDirNameCString != NULL)
-                tempDownloadsDirPath = [fileManager stringWithFileSystemRepresentation:tempDirNameCString length:strlen(tempDirNameCString)];
-            free(tempDirNameCString);
-        }
-        if (tempDownloadsDirPath)
-            [userDefaults setObject:tempDownloadsDirPath forKey:@"PithosSyncTempDownloadsDirPath"];
-        [tempDownloadsDirPath retain];
+    if (!tempDownloadsDirPath) {
+        tempDownloadsDirPath = [[[[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0] 
+                                  stringByAppendingPathComponent:[[NSBundle mainBundle] bundleIdentifier]] 
+                                 stringByAppendingPathComponent:[NSString stringWithFormat:@"%@-TempDownloads", 
+                                                                 pithosAccount.uniqueName]] retain];
+        NSFileManager *fileManager = [NSFileManager defaultManager];
+        BOOL isDirectory;
+        BOOL fileExists = [fileManager fileExistsAtPath:tempDownloadsDirPath isDirectory:&isDirectory];
+        NSError *error = nil;
+        if (fileExists && !isDirectory)
+            [fileManager removeItemAtPath:tempDownloadsDirPath error:&error];
+        if (!error & !fileExists)
+            [fileManager createDirectoryAtPath:tempDownloadsDirPath withIntermediateDirectories:YES attributes:nil error:&error];
+        //if (error)
+        //    tempDownloadsDirPath = nil;
+        // XXX create a dir using mktmps?
     }
-    return [[tempDownloadsDirPath copy] autorelease];
+    return tempDownloadsDirPath;    
 }
 
 - (NSString *)tempTrashDirPath {
-    NSFileManager *fileManager = [NSFileManager defaultManager];
-    if (!tempTrashDirPath || ![fileManager fileExistsAtPath:tempTrashDirPath]) {
-        // Get the path from user defaults
-        NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
-        tempTrashDirPath = [userDefaults stringForKey:@"PithosSyncTempTrashDirPath"];
-        if (tempTrashDirPath) {
-            // Check if the path exists
-            BOOL isDirectory;
-            BOOL fileExists = [fileManager fileExistsAtPath:tempTrashDirPath isDirectory:&isDirectory];
-            NSError *error = nil;
-            if (fileExists && !isDirectory)
-                [fileManager removeItemAtPath:tempTrashDirPath error:&error];
-            if (!error & !fileExists)
-                [fileManager createDirectoryAtPath:tempTrashDirPath withIntermediateDirectories:YES attributes:nil error:&error];
-            if (error)
-                tempTrashDirPath = nil;
-        }
-        if (!tempTrashDirPath) {
-            NSString *tempDirTemplate = [[[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0] 
-                                          stringByAppendingPathComponent:[[NSBundle mainBundle] bundleIdentifier]] 
-                                         stringByAppendingPathComponent:@"Temp Trash XXXXXX"];
-            const char *tempDirTemplateCString = [tempDirTemplate fileSystemRepresentation];
-            char *tempDirNameCString = (char *)malloc(strlen(tempDirTemplateCString) + 1);
-            strcpy(tempDirNameCString, tempDirTemplateCString);
-            tempDirNameCString = mkdtemp(tempDirNameCString);
-            if (tempDirNameCString != NULL)
-                tempTrashDirPath = [fileManager stringWithFileSystemRepresentation:tempDirNameCString length:strlen(tempDirNameCString)];
-            free(tempDirNameCString);
-        }
-        if (tempTrashDirPath)
-            [userDefaults setObject:tempTrashDirPath forKey:@"PithosSyncTempTrashDirPath"];
-        [tempTrashDirPath retain];
+    if (!tempTrashDirPath) {
+        tempTrashDirPath = [[[[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0] 
+                                  stringByAppendingPathComponent:[[NSBundle mainBundle] bundleIdentifier]] 
+                                 stringByAppendingPathComponent:[NSString stringWithFormat:@"%@-TempTrash", 
+                                                                 pithosAccount.uniqueName]] retain];
+        NSFileManager *fileManager = [NSFileManager defaultManager];
+        BOOL isDirectory;
+        BOOL fileExists = [fileManager fileExistsAtPath:tempTrashDirPath isDirectory:&isDirectory];
+        NSError *error = nil;
+        if (fileExists && !isDirectory)
+            [fileManager removeItemAtPath:tempTrashDirPath error:&error];
+        if (!error & !fileExists)
+            [fileManager createDirectoryAtPath:tempTrashDirPath withIntermediateDirectories:YES attributes:nil error:&error];
+        //if (error)
+        //    tempTrashDirPath = nil;
+        // XXX create a dir using mktmps?
     }
-    return [[tempTrashDirPath copy] autorelease];
+    return tempTrashDirPath;
+}
+
+- (void)setDirectoryPath:(NSString *)aDirectoryPath {
+    if (aDirectoryPath && ![aDirectoryPath isEqualToString:directoryPath]) {
+        [self resetDaemon];
+        [self resetLocalState];
+        [directoryPath release];
+        directoryPath = [aDirectoryPath copy];
+    }
+}
+
+- (void)setContainerName:(NSString *)aContainerName {
+    if (aContainerName && ![aContainerName isEqualToString:containerName]) {
+        [self resetDaemon];
+        [self resetLocalState];
+        [containerName release];
+        containerName = [aContainerName copy];
+    }    
+}
+
+- (void)setPithos:(ASIPithos *)aPithos {
+    if (!pithos) {
+        pithos = [[ASIPithos pithos] retain];
+        pithos.authUser = [[aPithos.authUser copy] autorelease];
+        pithos.authToken = [[aPithos.authToken copy] autorelease];
+        pithos.storageURLPrefix = [[aPithos.storageURLPrefix copy] autorelease];
+        pithos.authURL = [[aPithos.authURL copy] autorelease];
+        pithos.publicURLPrefix = [[aPithos.publicURLPrefix copy] autorelease];
+    }
+    if (aPithos && 
+        (![aPithos.authUser isEqualToString:pithos.authUser] || 
+         ![aPithos.authToken isEqualToString:pithos.authToken] || 
+         ![aPithos.storageURLPrefix isEqualToString:pithos.storageURLPrefix])) {
+        [self resetDaemon];
+        if (![aPithos.authUser isEqualToString:pithos.authUser] || 
+            ![aPithos.storageURLPrefix isEqualToString:pithos.storageURLPrefix])
+            [self resetLocalState];
+        pithos.authUser = [[aPithos.authUser copy] autorelease];
+        pithos.authToken = [[aPithos.authToken copy] autorelease];
+        pithos.storageURLPrefix = [[aPithos.storageURLPrefix copy] autorelease];
+        pithos.authURL = [[aPithos.authURL copy] autorelease];
+        pithos.publicURLPrefix = [[aPithos.publicURLPrefix copy] autorelease];
+    }        
 }
 
 #pragma mark -
@@ -273,40 +330,64 @@
     [pool drain];
 }
 
-- (void)increaseSyncOperationCount {
+- (void)syncOperationStarted {
     @synchronized(self) {
         syncOperationCount++;
     }
 }
 
-- (void)decreaseSyncOperationCount {
+- (void)syncOperationFinishedWithSuccess:(BOOL)operationSuccessfull {
     @synchronized(self) {
+        if (!operationSuccessfull)
+            syncIncomplete = YES;
+        if (syncOperationCount == 0)
+            // XXX This shouldn't happen, maybe change operationCount to a BOOL as operationsPending in browser
+            return;
         syncOperationCount--;
-        if (!syncOperationCount) {
+        if (syncOperationCount == 0) {
             if (!syncIncomplete) {
                 self.lastCompletedSync = [NSDate date];
                 dispatch_async(dispatch_get_main_queue(), ^{
                     [activityFacility startAndEndActivityWithType:PithosActivityOther 
-                                                          message:[NSString stringWithFormat:@"Sync: Completed %@", lastCompletedSync]];
-
+                                                          message:[NSString stringWithFormat:@"Sync: Completed %@", lastCompletedSync] 
+                                                    pithosAccount:pithosAccount];
+                    
                 });
             }
             [self emptyTempTrash];
+            if (newSyncRequested && daemonActive)
+                [self sync];
         }
     }
 }
 
+- (BOOL)isSyncing {
+    @synchronized(self) {
+        return ((syncOperationCount > 0) && daemonActive);
+    }
+}
+
+- (void)syncLate {
+    @synchronized(self) {
+        if ([self isSyncing])
+            syncLate = YES;
+    }
+}
+
 - (void)sync {
     @synchronized(self) {
-        if (syncOperationCount) {
+        if ([self isSyncing]) {
             // If at least one operation is running return
             newSyncRequested = YES;
             return;
-        } else {
+        } else if (daemonActive) {
             // The first operation is the server listing
-            syncOperationCount = 1;
+            [self syncOperationStarted];
             newSyncRequested = NO;
             syncIncomplete = NO;
+            syncLate = NO;
+        } else {
+            return;
         }
     }
 
@@ -319,18 +400,14 @@
             [PithosUtilities fileActionFailedAlertWithTitle:@"Local Sync Directory Error" 
                                                     message:[NSString stringWithFormat:@"Cannot create local sync directory at '%@'", containerDirectoryPath] 
                                                       error:error];
-            @synchronized(self) {
-                syncOperationCount = 0;
-            }
+            [self syncOperationFinishedWithSuccess:NO];
             return;
         }
     } else if (!isDirectory) {
         [PithosUtilities fileActionFailedAlertWithTitle:@"Local Sync Directory Error" 
                                                 message:[NSString stringWithFormat:@"File already exists at the local sync directory path at '%@'", containerDirectoryPath] 
                                                   error:nil];
-        @synchronized(self) {
-            syncOperationCount = 0;
-        }
+        [self syncOperationFinishedWithSuccess:NO];
         return;
     }
     
@@ -349,7 +426,8 @@
     containerRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
     containerRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
     PithosActivity *activity = [activityFacility startActivityWithType:PithosActivityOther 
-                                                               message:@"Sync: Getting server listing"];
+                                                               message:@"Sync: Getting server listing" 
+                                                         pithosAccount:pithosAccount];
     containerRequest.userInfo = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                  activity, @"activity", 
                                  @"Sync: Getting server listing (stopped)", @"stoppedActivityMessage", 
@@ -385,7 +463,7 @@
 //            for (NSString *subPath in subPaths) {
 //                [subURLs addObject:[NSURL fileURLWithPath:[trashDirPath stringByAppendingPathComponent:subPath]]];
 //            }
-//            syncOperationCount = 1;
+//            [self syncOperationStarted];
 //            [[NSWorkspace sharedWorkspace] recycleURLs:subURLs completionHandler:^(NSDictionary *newURLs, NSError *error) {
 //                if (error) {
 //                    dispatch_async(dispatch_get_main_queue(), ^{
@@ -394,7 +472,7 @@
 //                                                                  error:error];
 //                    });
 //                }
-//                syncOperationCount = 0;
+//                [self syncOperationFinishedWithSuccess:YES];
 //            }];
             for (NSString *subPath in subPaths) {
                 NSString *subFilePath = [trashDirPath stringByAppendingPathComponent:subPath];
@@ -592,7 +670,8 @@
         if (!fileExists || [self moveToTempTrashFile:filePath]) {
             dispatch_async(dispatch_get_main_queue(), ^{
                 [activityFacility startAndEndActivityWithType:PithosActivityOther 
-                                                      message:[NSString stringWithFormat:@"Sync: Deleting '%@' locally (finished)", object.name]];
+                                                      message:[NSString stringWithFormat:@"Sync: Deleting '%@' locally (finished)", object.name] 
+                                                pithosAccount:pithosAccount];
             });
             [storedLocalObjectStates removeObjectForKey:object.name];
             [self saveLocalState];
@@ -629,7 +708,8 @@
         if (directoryCreated)
             dispatch_async(dispatch_get_main_queue(), ^{
                 [activityFacility startAndEndActivityWithType:PithosActivityOther 
-                                                      message:[NSString stringWithFormat:@"Sync: Creating directory '%@' locally (finished)", object.name]];
+                                                      message:[NSString stringWithFormat:@"Sync: Creating directory '%@' locally (finished)", object.name] 
+                                                pithosAccount:pithosAccount];
             });
     } else if (object.bytes == 0) {
         // Create local object with zero length
@@ -673,7 +753,8 @@
         if (fileCreated)
             dispatch_async(dispatch_get_main_queue(), ^{
                 [activityFacility startAndEndActivityWithType:PithosActivityOther 
-                                                      message:[NSString stringWithFormat:@"Sync: Downloading '%@' (100%%)", object.name]];
+                                                      message:[NSString stringWithFormat:@"Sync: Downloading '%@' (100%%)", object.name] 
+                                                pithosAccount:pithosAccount];
             });
     } else if (storedState.tmpFilePath == nil) {
         // Create new local object
@@ -699,10 +780,11 @@
             [self saveLocalState];
             dispatch_async(dispatch_get_main_queue(), ^{
                 [activityFacility startAndEndActivityWithType:PithosActivityOther 
-                                                      message:[NSString stringWithFormat:@"Sync: Downloading '%@' (100%%)", object.name]];
+                                                      message:[NSString stringWithFormat:@"Sync: Downloading '%@' (100%%)", object.name] 
+                                                pithosAccount:pithosAccount];
             });
         } else {
-            [self increaseSyncOperationCount];
+            [self syncOperationStarted];
             __block ASIPithosObjectRequest *objectRequest = [PithosUtilities objectBlockDataRequestWithPithos:pithos 
                                                                                                 containerName:containerName 
                                                                                                        object:object 
@@ -714,9 +796,10 @@
             PithosActivity *activity = [activityFacility startActivityWithType:PithosActivityDownload 
                                                                        message:[NSString stringWithFormat:@"Sync: Downloading '%@' (0%%)", object.name] 
                                                                     totalBytes:object.bytes 
-                                                                  currentBytes:0];
+                                                                  currentBytes:0 
+                                                                 pithosAccount:pithosAccount];
             dispatch_async(dispatch_get_main_queue(), ^{
-                [activityFacility updateActivity:activity withMessage:activity.message];  
+                [activityFacility updateActivity:activity withMessage:activity.message];
             });
             objectRequest.userInfo = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                       object, @"pithosObject", 
@@ -768,10 +851,11 @@
             [self saveLocalState];
             dispatch_async(dispatch_get_main_queue(), ^{
                 [activityFacility startAndEndActivityWithType:PithosActivityOther 
-                                                      message:[NSString stringWithFormat:@"Sync: Downloading '%@' (100%%)", object.name]];
+                                                      message:[NSString stringWithFormat:@"Sync: Downloading '%@' (100%%)", object.name] 
+                                                pithosAccount:pithosAccount];
             });
         } else {
-            [self increaseSyncOperationCount];
+            [self syncOperationStarted];
             ASIPithosObjectRequest *objectRequest = [ASIPithosObjectRequest objectHashmapRequestWithPithos:pithos 
                                                                                              containerName:containerName 
                                                                                                 objectName:object.name];
@@ -781,7 +865,8 @@
             PithosActivity *activity = [activityFacility startActivityWithType:PithosActivityDownload 
                                                                        message:[NSString stringWithFormat:@"Sync: Downloading '%@' (0%%)", object.name] 
                                                                     totalBytes:object.bytes 
-                                                                  currentBytes:0];
+                                                                  currentBytes:0 
+                                                                 pithosAccount:pithosAccount];
             dispatch_async(dispatch_get_main_queue(), ^{
                 [activityFacility updateActivity:activity withMessage:activity.message];
             });
@@ -807,7 +892,7 @@
                                   object:(ASIPithosObject *)object 
                            localFilePath:(NSString *)filePath {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    [self increaseSyncOperationCount];
+    [self syncOperationStarted];
     NSFileManager *fileManager = [NSFileManager defaultManager];
     BOOL isDirectory;
     BOOL fileExists = [fileManager fileExistsAtPath:filePath isDirectory:&isDirectory];
@@ -815,8 +900,7 @@
         // Create remote directory object
         if (!fileExists || !isDirectory) {
             // Local directory object deleted or changed to a file in the meantime, mark the sync cycle as incomplete and skip
-            syncIncomplete = YES;
-            [self decreaseSyncOperationCount];
+            [self syncOperationFinishedWithSuccess:NO];
             [pool drain];
             return;
         }
@@ -836,7 +920,8 @@
         objectRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
         objectRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
         PithosActivity *activity = [activityFacility startActivityWithType:PithosActivityCreateDirectory 
-                                                                   message:[NSString stringWithFormat:@"Sync: Creating directory '%@'", object.name]];
+                                                                   message:[NSString stringWithFormat:@"Sync: Creating directory '%@'", object.name] 
+                                                             pithosAccount:pithosAccount];
         dispatch_async(dispatch_get_main_queue(), ^{
             [activityFacility updateActivity:activity withMessage:activity.message];
         });
@@ -875,7 +960,8 @@
                 objectRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
                 objectRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
                 PithosActivity *activity = [activityFacility startActivityWithType:PithosActivityDelete 
-                                                                           message:[NSString stringWithFormat:@"Sync: Moving to trash '%@'", object.name]];
+                                                                           message:[NSString stringWithFormat:@"Sync: Moving to trash '%@'", object.name] 
+                                                                     pithosAccount:pithosAccount];
                 dispatch_async(dispatch_get_main_queue(), ^{
                     [activityFacility updateActivity:activity withMessage:activity.message];
                 });
@@ -892,19 +978,16 @@
                                           nil];
                 [networkQueue addOperation:[PithosUtilities prepareRequest:objectRequest priority:NSOperationQueuePriorityHigh]];
             } else {
-                syncIncomplete = YES;
-                [self decreaseSyncOperationCount];
+                [self syncOperationFinishedWithSuccess:NO];
             }
         } else {
-            syncIncomplete = YES;
-            [self decreaseSyncOperationCount];
+            [self syncOperationFinishedWithSuccess:NO];
         }
     } else {
         // Upload file to remote object
         if (!fileExists || isDirectory) {
             // Local file object deleted or changed to a directory in the meantime, mark the sync cycle as incomplete and skip
-            syncIncomplete = YES;
-            [self decreaseSyncOperationCount];
+            [self syncOperationFinishedWithSuccess:NO];
             [pool drain];
             return;
         }
@@ -932,7 +1015,8 @@
             PithosActivity *activity = [activityFacility startActivityWithType:PithosActivityUpload 
                                                                        message:[NSString stringWithFormat:@"Sync: Uploading '%@' (0%%)", object.name]
                                                                     totalBytes:[[objectRequest.userInfo objectForKey:@"bytes"] unsignedIntegerValue]
-                                                                  currentBytes:0];
+                                                                  currentBytes:0 
+                                                                 pithosAccount:pithosAccount];
             dispatch_async(dispatch_get_main_queue(), ^{
                 [activityFacility updateActivity:activity withMessage:activity.message];
             });
@@ -953,8 +1037,7 @@
               nil]];
             [networkQueue addOperation:[PithosUtilities prepareRequest:objectRequest priority:NSOperationQueuePriorityNormal]];
         } else {
-            syncIncomplete = YES;
-            [self decreaseSyncOperationCount];
+            [self syncOperationFinishedWithSuccess:NO];
         }
     }
     [pool drain];
@@ -964,21 +1047,59 @@
 #pragma mark ASIHTTPRequestDelegate
 
 - (void)performRequestFinishedDelegateInBackground:(ASIPithosRequest *)request {
-    dispatch_async(queue, ^{
-        [self performSelector:NSSelectorFromString([request.userInfo objectForKey:@"didFinishSelector"]) withObject:request];
-    });
+    // Add an operation to the callbackQueue with a completionBlock for the case of cancellation
+    NSInvocationOperation *operation = [[[NSInvocationOperation alloc] initWithTarget:self 
+                                                                             selector:NSSelectorFromString([request.userInfo objectForKey:@"didFinishSelector"]) 
+                                                                               object:request] autorelease];
+    operation.completionBlock = ^{
+        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+        if ([[request.userInfo objectForKey:@"operation"] isCancelled]) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [activityFacility endActivity:[request.userInfo objectForKey:@"activity"] 
+                                  withMessage:[request.userInfo objectForKey:@"stoppedActivityMessage"]];
+            });
+            [self syncOperationFinishedWithSuccess:NO];
+        }
+        [pool drain];
+    };
+    [(NSMutableDictionary *)request.userInfo setObject:operation forKey:@"operation"];
+    [callbackQueue addOperation:operation];
 }
 
 - (void)performRequestFailedDelegateInBackground:(ASIPithosRequest *)request {
-    dispatch_async(queue, ^{
-        [self performSelector:NSSelectorFromString([request.userInfo objectForKey:@"didFailSelector"]) withObject:request];
-    });
+    if (request.isCancelled) {
+        // Request has been cancelled 
+        // The callbackQueue might be suspended so we call directly the callback method, since it does minimal work anyway
+        [self performSelector:NSSelectorFromString([request.userInfo objectForKey:@"didFailSelector"]) 
+                   withObject:request];
+    } else {
+        // Add an operation to the callbackQueue with a completionBlock for the case of cancellation
+        NSInvocationOperation *operation = [[[NSInvocationOperation alloc] initWithTarget:self 
+                                                                                 selector:NSSelectorFromString([request.userInfo objectForKey:@"didFailSelector"]) 
+                                                                                   object:request] autorelease];
+        operation.completionBlock = ^{
+            NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+            if ([[request.userInfo objectForKey:@"operation"] isCancelled]) {
+                dispatch_async(dispatch_get_main_queue(), ^{
+                    [activityFacility endActivity:[request.userInfo objectForKey:@"activity"] 
+                                      withMessage:[request.userInfo objectForKey:@"stoppedActivityMessage"]];
+                });
+                [self syncOperationFinishedWithSuccess:NO];
+            }
+            [pool drain];
+        };
+        [(NSMutableDictionary *)request.userInfo setObject:operation forKey:@"operation"];
+        [callbackQueue addOperation:operation];
+    }
 }
 
 - (void)listRequestFinished:(ASIPithosContainerRequest *)containerRequest {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    NSOperation *operation = [containerRequest.userInfo objectForKey:@"operation"];
     NSLog(@"Sync::list request finished: %@", containerRequest.url);
-    if ((containerRequest.responseStatusCode == 200) || (containerRequest.responseStatusCode == 304)) {
+    if (operation.isCancelled) {
+        [self listRequestFailed:containerRequest];
+    } else if ((containerRequest.responseStatusCode == 200) || (containerRequest.responseStatusCode == 304)) {
         if (containerRequest.responseStatusCode == 200) {
             NSArray *someObjects = [containerRequest objects];
             if (objects == nil) {
@@ -1012,13 +1133,20 @@
                 newContainerRequest.delegate = self;
                 newContainerRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
                 newContainerRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
-                newContainerRequest.userInfo = newContainerRequest.userInfo;
+                newContainerRequest.userInfo = containerRequest.userInfo;
                 [(NSMutableDictionary *)newContainerRequest.userInfo setObject:[NSNumber numberWithUnsignedInteger:10] forKey:@"retries"];
                 [networkQueue addOperation:[PithosUtilities prepareRequest:newContainerRequest priority:[[newContainerRequest.userInfo objectForKey:@"priority"] integerValue]]];
                 [pool drain];
                 return;
             }
         }
+        
+        if (operation.isCancelled) {
+            [self listRequestFailed:containerRequest];
+            [pool drain];
+            return;
+        }
+
         dispatch_async(dispatch_get_main_queue(), ^{
             [activityFacility endActivity:[containerRequest.userInfo objectForKey:@"activity"] 
                               withMessage:[containerRequest.userInfo objectForKey:@"finishedActivityMessage"]];
@@ -1031,19 +1159,33 @@
                 [PithosUtilities fileActionFailedAlertWithTitle:@"Directory Contents Error" 
                                                         message:[NSString stringWithFormat:@"Cannot get contents of directory at '%@'", containerDirectoryPath] 
                                                           error:error];
-                [activityFacility startAndEndActivityWithType:PithosActivityOther message:@"Sync: Failed to read contents of sync directory"];
+                [activityFacility startAndEndActivityWithType:PithosActivityOther 
+                                                      message:@"Sync: Failed to read contents of sync directory" 
+                                                pithosAccount:pithosAccount];
             });
-            @synchronized(self) {
-                // Since the local listing failed, the operation finished and the sync cycle is completeted unsuccessfully
-                syncOperationCount = 0;
-                if (newSyncRequested)
-                    [self sync];
-            }
+            // Since the local listing failed, the operation finished and the sync cycle is completeted unsuccessfully
+            [self syncOperationFinishedWithSuccess:NO];
+            [pool drain];
+            return;
+        }
+        
+        if (operation.isCancelled) {
+            operation.completionBlock = nil;
+            [self syncOperationFinishedWithSuccess:NO];
             [pool drain];
             return;
         }
+
         self.currentLocalObjectStates = [NSMutableDictionary dictionaryWithCapacity:[subPaths count]];
         for (NSString *objectName in subPaths) {
+            if (operation.isCancelled) {
+                operation.completionBlock = nil;
+                [self saveLocalState];
+                [self syncOperationFinishedWithSuccess:NO];
+                [pool drain];
+                return;
+            }
+
             PithosLocalObjectState *storedLocalObjectState = [storedLocalObjectStates objectForKey:objectName];
             NSString *filePath = [containerDirectoryPath stringByAppendingPathComponent:objectName];
             if (!storedLocalObjectState || [storedLocalObjectState isModified]) {
@@ -1062,12 +1204,42 @@
         }
         [self saveLocalState];
 
+        if (operation.isCancelled) {
+            operation.completionBlock = nil;
+            [self syncOperationFinishedWithSuccess:NO];
+            [pool drain];
+            return;
+        }
+
         for (NSString *objectName in remoteObjects) {
+            if (operation.isCancelled) {
+                operation.completionBlock = nil;
+                [self saveLocalState];
+                [self syncOperationFinishedWithSuccess:NO];
+                [pool drain];
+                return;
+            }
+
             if (![storedLocalObjectStates objectForKey:objectName])
                 [storedLocalObjectStates setObject:[PithosLocalObjectState localObjectState] forKey:objectName];
         }
+        [self saveLocalState];
+
+        if (operation.isCancelled) {
+            operation.completionBlock = nil;
+            [self syncOperationFinishedWithSuccess:NO];
+            [pool drain];
+            return;
+        }
 
         for (NSString *objectName in [[storedLocalObjectStates allKeys] sortedArrayUsingSelector:@selector(compare:)]) {
+            if (operation.isCancelled) {
+                operation.completionBlock = nil;
+                [self syncOperationFinishedWithSuccess:NO];
+                [pool drain];
+                return;
+            }
+
             NSString *filePath = [containerDirectoryPath stringByAppendingPathComponent:objectName];
             if ([objectName hasSuffix:@"/"])
                 filePath = [filePath stringByAppendingString:@":"];
@@ -1179,45 +1351,30 @@
                 }
             }
         }
-        @synchronized(self) {
-            [self decreaseSyncOperationCount];
-            if (newSyncRequested && !syncOperationCount)
-                [self sync];
-        }
+        [self syncOperationFinishedWithSuccess:YES];
     } else {
-        NSUInteger retries = [[containerRequest.userInfo objectForKey:@"retries"] unsignedIntegerValue];
-        if (retries > 0) {
-            ASIPithosContainerRequest *newContainerRequest = (ASIPithosContainerRequest *)[[PithosUtilities copyRequest:containerRequest] autorelease];
-            [(NSMutableDictionary *)(newContainerRequest.userInfo)setObject:[NSNumber numberWithUnsignedInteger:(--retries)] forKey:@"retries"];
-            [networkQueue addOperation:[PithosUtilities prepareRequest:newContainerRequest priority:[[newContainerRequest.userInfo objectForKey:@"priority"] integerValue]]];
-        } else {
-            dispatch_async(dispatch_get_main_queue(), ^{
-                [activityFacility endActivity:[containerRequest.userInfo objectForKey:@"activity"] 
-                                  withMessage:[containerRequest.userInfo objectForKey:@"failedActivityMessage"]];
-            });
-            @synchronized(self) {
-                // Since the server listing failed in all retries, the operation finished and the sync cycle is completeted unsuccesfully
-                syncOperationCount = 0;
-                if (newSyncRequested)
-                    [self sync];
-            }
-        }
+        [self listRequestFailed:containerRequest];
     }
     [pool drain];
 }
 
 - (void)listRequestFailed:(ASIPithosContainerRequest *)containerRequest {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    if ([containerRequest isCancelled]) {
+    NSOperation *operation = [containerRequest.userInfo objectForKey:@"operation"];
+    if (operation.isCancelled) {
+        [objects release];
+        objects = nil;
+        [pool drain];
+        return;        
+    }
+    if (containerRequest.isCancelled) {
         dispatch_async(dispatch_get_main_queue(), ^{
             [activityFacility endActivity:[containerRequest.userInfo objectForKey:@"activity"] 
                               withMessage:[containerRequest.userInfo objectForKey:@"stoppedActivityMessage"]];
         });
         [objects release];
         objects = nil;
-        @synchronized(self) {
-            syncOperationCount = 0;
-        }
+        [self syncOperationFinishedWithSuccess:NO];
         [pool drain];
         return;
     }
@@ -1234,20 +1391,19 @@
         });
         [objects release];
         objects = nil;
-        @synchronized(self) {
-            // Since the server listing failed in all retries, the operation finished and the sync cycle is completeted unsuccesfully
-            syncOperationCount = 0;
-            if (newSyncRequested)
-                [self sync];
-        }
+        // Since the server listing failed in all retries, the operation finished and the sync cycle is completeted unsuccesfully
+        [self syncOperationFinishedWithSuccess:NO];
     }
     [pool drain];
 }
 
 - (void)downloadObjectBlockFinished:(ASIPithosObjectRequest *)objectRequest {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    NSOperation *operation = [objectRequest.userInfo objectForKey:@"operation"];
     NSLog(@"Sync::download object block finished: %@", objectRequest.url);
-    if (objectRequest.responseStatusCode == 206) {
+    if (operation.isCancelled) {
+        [self requestFailed:objectRequest];
+    } else if (objectRequest.responseStatusCode == 206) {
         ASIPithosObject *object = [objectRequest.userInfo objectForKey:@"pithosObject"];
         NSFileManager *fileManager = [NSFileManager defaultManager];
         NSError *error;
@@ -1259,12 +1415,7 @@
                 [activityFacility endActivity:activity 
                                   withMessage:[objectRequest.userInfo objectForKey:@"failedActivityMessage"]];
             });
-            @synchronized(self) {
-                syncIncomplete = YES;
-                [self decreaseSyncOperationCount];
-                if (newSyncRequested && !syncOperationCount)
-                    [self sync];
-            }
+            [self syncOperationFinishedWithSuccess:NO];
             [pool drain];
             return;
         }
@@ -1286,12 +1437,7 @@
                     [activityFacility endActivity:activity 
                                       withMessage:[objectRequest.userInfo objectForKey:@"failedActivityMessage"]];
                 });
-                @synchronized(self) {
-                    syncIncomplete = YES;
-                    [self decreaseSyncOperationCount];
-                    if (newSyncRequested && !syncOperationCount)
-                        [self sync];
-                }
+                [self syncOperationFinishedWithSuccess:NO];
                 [pool drain];
                 return;
             }
@@ -1317,12 +1463,7 @@
                     [activityFacility endActivity:activity 
                                       withMessage:[objectRequest.userInfo objectForKey:@"failedActivityMessage"]];
                 });
-                @synchronized(self) {
-                    syncIncomplete = YES;
-                    [self decreaseSyncOperationCount];
-                    if (newSyncRequested && !syncOperationCount)
-                        [self sync];
-                }
+                [self syncOperationFinishedWithSuccess:NO];
                 [pool drain];
                 return;
             } else if (![fileManager fileExistsAtPath:dirPath]) {
@@ -1339,12 +1480,7 @@
                         [activityFacility endActivity:[objectRequest.userInfo objectForKey:@"activity"] 
                                           withMessage:[objectRequest.userInfo objectForKey:@"failedActivityMessage"]];
                     });
-                    @synchronized(self) {
-                        syncIncomplete = YES;
-                        [self decreaseSyncOperationCount];
-                        if (newSyncRequested && !syncOperationCount)
-                            [self sync];
-                    }
+                    [self syncOperationFinishedWithSuccess:NO];
                     [pool drain];
                     return;
                 }
@@ -1360,12 +1496,7 @@
                     [activityFacility endActivity:activity 
                                       withMessage:[objectRequest.userInfo objectForKey:@"failedActivityMessage"]];
                 });
-                @synchronized(self) {
-                    syncIncomplete = YES;
-                    [self decreaseSyncOperationCount];
-                    if (newSyncRequested && !syncOperationCount)
-                        [self sync];
-                }
+                [self syncOperationFinishedWithSuccess:NO];
                 [pool drain];
                 return;
             }
@@ -1380,28 +1511,12 @@
             storedState.hash = object.objectHash;
             storedState.tmpFilePath = nil;
             [self saveLocalState];
-            
-            @synchronized(self) {
-                [self decreaseSyncOperationCount];
-                if (newSyncRequested && !syncOperationCount)
-                    [self sync];
-            }
+            [self syncOperationFinishedWithSuccess:YES];
             [pool drain];
             return;
         } else {
-            if (newSyncRequested) {
-                dispatch_async(dispatch_get_main_queue(), ^{
-                    [activityFacility endActivity:[objectRequest.userInfo objectForKey:@"activity"] 
-                                      withMessage:[objectRequest.userInfo objectForKey:@"stoppedActivityMessage"]];
-                });
-                @synchronized(self) {
-                    syncIncomplete = YES;
-                    [self decreaseSyncOperationCount];
-                    if (!syncOperationCount)
-                        [self sync];
-                }
-                [pool drain];
-                return;
+            if (newSyncRequested || syncLate || operation.isCancelled) {
+                [self requestFailed:objectRequest];
             } else {
                 __block ASIPithosObjectRequest *newObjectRequest = [PithosUtilities objectBlockDataRequestWithPithos:pithos 
                                                                                                        containerName:containerName 
@@ -1431,12 +1546,7 @@
             [activityFacility endActivity:[objectRequest.userInfo objectForKey:@"activity"] 
                               withMessage:[objectRequest.userInfo objectForKey:@"stoppedActivityMessage"]];
         });
-        @synchronized(self) {
-            syncIncomplete = YES;
-            [self decreaseSyncOperationCount];
-            if (newSyncRequested && !syncOperationCount)
-                [self sync];
-        }
+        [self syncOperationFinishedWithSuccess:NO];
     } else {
         [self requestFailed:objectRequest];
     }
@@ -1445,21 +1555,13 @@
 
 - (void)downloadObjectHashMapFinished:(ASIPithosObjectRequest *)objectRequest {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    NSOperation *operation = [objectRequest.userInfo objectForKey:@"operation"];
     NSLog(@"Sync::download object hashmap finished: %@", objectRequest.url);
-    if (objectRequest.responseStatusCode == 200) {
-        if (newSyncRequested) {
-            dispatch_async(dispatch_get_main_queue(), ^{
-                [activityFacility endActivity:[objectRequest.userInfo objectForKey:@"activity"] 
-                                  withMessage:[objectRequest.userInfo objectForKey:@"stoppedActivityMessage"]];
-            });
-            @synchronized(self) {
-                syncIncomplete = YES;
-                [self decreaseSyncOperationCount];
-                if (!syncOperationCount)
-                    [self sync];
-            }
-            [pool drain];
-            return;
+    if (operation.isCancelled) {
+        [self requestFailed:objectRequest];
+    } else if (objectRequest.responseStatusCode == 200) {
+        if (newSyncRequested || syncLate || operation.isCancelled) {
+            [self requestFailed:objectRequest];
         } else {
             ASIPithosObject *object = [objectRequest.userInfo objectForKey:@"pithosObject"];
             PithosLocalObjectState *storedState = [storedLocalObjectStates objectForKey:object.name];
@@ -1511,8 +1613,11 @@
 
 - (void)uploadDirectoryObjectFinished:(ASIPithosObjectRequest *)objectRequest {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    NSOperation *operation = [objectRequest.userInfo objectForKey:@"operation"];
     NSLog(@"Sync::upload directory object finished: %@", objectRequest.url);
-    if (objectRequest.responseStatusCode == 201) {
+    if (operation.isCancelled) {
+        [self requestFailed:objectRequest];
+    } else if (objectRequest.responseStatusCode == 201) {
         PithosLocalObjectState *storedState = [storedLocalObjectStates objectForKey:[[objectRequest.userInfo objectForKey:@"pithosObject"] name]];
         storedState.isDirectory = YES;
         [self saveLocalState];
@@ -1520,11 +1625,7 @@
             [activityFacility endActivity:[objectRequest.userInfo objectForKey:@"activity"] 
                               withMessage:[objectRequest.userInfo objectForKey:@"finishedActivityMessage"]];
         });
-        @synchronized(self) {
-            [self decreaseSyncOperationCount];
-            if (newSyncRequested && !syncOperationCount)
-                [self sync];
-        }
+        [self syncOperationFinishedWithSuccess:YES];
     } else {
         [self requestFailed:objectRequest];
     }
@@ -1533,19 +1634,18 @@
 
 - (void)moveObjectToTrashFinished:(ASIPithosObjectRequest *)objectRequest {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    NSOperation *operation = [objectRequest.userInfo objectForKey:@"operation"];
     NSLog(@"Sync::move object to trash finished: %@", objectRequest.url);
-    if (objectRequest.responseStatusCode == 201) {
+    if (operation.isCancelled) {
+        [self requestFailed:objectRequest];
+    } else if (objectRequest.responseStatusCode == 201) {
         [storedLocalObjectStates removeObjectForKey:[[objectRequest.userInfo objectForKey:@"pithosObject"] name]];
         [self saveLocalState];
         dispatch_async(dispatch_get_main_queue(), ^{
             [activityFacility endActivity:[objectRequest.userInfo objectForKey:@"activity"] 
                               withMessage:[objectRequest.userInfo objectForKey:@"finishedActivityMessage"]];
         });
-        @synchronized(self) {
-            [self decreaseSyncOperationCount];
-            if (newSyncRequested && !syncOperationCount)
-                [self sync];
-        }
+        [self syncOperationFinishedWithSuccess:YES];
     } else {
         [self requestFailed:objectRequest];
     }
@@ -1554,13 +1654,16 @@
 
 - (void)uploadObjectUsingHashMapFinished:(ASIPithosObjectRequest *)objectRequest {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    NSOperation *operation = [objectRequest.userInfo objectForKey:@"operation"];
     NSLog(@"Sync::upload using hashmap finished: %@", objectRequest.url);
     ASIPithosObject *object = [objectRequest.userInfo objectForKey:@"pithosObject"];
     PithosLocalObjectState *storedState = [storedLocalObjectStates objectForKey:object.name];
     PithosActivity *activity = [objectRequest.userInfo objectForKey:@"activity"];
     NSUInteger totalBytes = activity.totalBytes;
     NSUInteger currentBytes = activity.currentBytes;
-    if (objectRequest.responseStatusCode == 201) {
+    if (operation.isCancelled) {
+        [self requestFailed:objectRequest];
+    } else if (objectRequest.responseStatusCode == 201) {
         NSLog(@"Sync::object created: %@", objectRequest.url);
         storedState.hash = [objectRequest objectHash];
         [self saveLocalState];
@@ -1570,35 +1673,18 @@
                                totalBytes:totalBytes 
                              currentBytes:totalBytes];
         });
-        @synchronized(self) {
-            [self decreaseSyncOperationCount];
-            if (newSyncRequested && !syncOperationCount)
-                [self sync];
-        }
+        [self syncOperationFinishedWithSuccess:YES];
     } else if (objectRequest.responseStatusCode == 409) {
-        if (newSyncRequested) {
-            dispatch_async(dispatch_get_main_queue(), ^{
-                [activityFacility endActivity:activity 
-                                  withMessage:[objectRequest.userInfo objectForKey:@"stoppedActivityMessage"]];
-            });
-            @synchronized(self) {
-                syncIncomplete = YES;
-                [self decreaseSyncOperationCount];
-                if (!syncOperationCount)
-                    [self sync];
-            }
-            [pool drain];
-            return;
+        if (newSyncRequested || syncLate || operation.isCancelled) {
+            [self requestFailed:objectRequest];
         } else {
             NSUInteger iteration = [[objectRequest.userInfo objectForKey:@"iteration"] unsignedIntegerValue];
             if (iteration == 0) {
                 NSLog(@"Sync::upload iteration limit reached: %@", objectRequest.url);
                 dispatch_async(dispatch_get_main_queue(), ^{
-                    [activityFacility endActivity:activity 
-                                      withMessage:[objectRequest.userInfo objectForKey:@"stoppedActivityMessage"]];
+                    [activityFacility endActivity:activity withMessage:[objectRequest.userInfo objectForKey:@"stoppedActivityMessage"]];
                 });
-                syncIncomplete = YES;
-                [self decreaseSyncOperationCount];
+                [self syncOperationFinishedWithSuccess:NO];
                 [pool drain];
                 return;
             }
@@ -1645,14 +1731,19 @@
 
 - (void)uploadMissingBlockFinished:(ASIPithosContainerRequest *)containerRequest {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    NSOperation *operation = [containerRequest.userInfo objectForKey:@"operation"];
     NSLog(@"Sync::upload of missing block finished: %@", containerRequest.url);
-    if (containerRequest.responseStatusCode == 202) {
+    if (operation.isCancelled) {
+        [self requestFailed:containerRequest];
+    } else if (containerRequest.responseStatusCode == 202) {
         ASIPithosObject *object = [containerRequest.userInfo objectForKey:@"pithosObject"];
         PithosActivity *activity = [containerRequest.userInfo objectForKey:@"activity"];
         NSIndexSet *missingBlocks = [containerRequest.userInfo objectForKey:@"missingBlocks"];
         NSUInteger missingBlockIndex = [[containerRequest.userInfo objectForKey:@"missingBlockIndex"] unsignedIntegerValue];
         missingBlockIndex = [missingBlocks indexGreaterThanIndex:missingBlockIndex];
-        if (missingBlockIndex == NSNotFound) {
+        if (operation.isCancelled) {
+            [self requestFailed:containerRequest];
+        } else if (missingBlockIndex == NSNotFound) {
             NSArray *hashes = [containerRequest.userInfo objectForKey:@"hashes"];
             ASIPithosObjectRequest *newObjectRequest = [PithosUtilities writeObjectDataRequestWithPithos:pithos 
                                                                                            containerName:containerName 
@@ -1674,19 +1765,8 @@
             [(NSMutableDictionary *)(newObjectRequest.userInfo) setObject:NSStringFromSelector(@selector(uploadObjectUsingHashMapFinished:)) forKey:@"didFinishSelector"];
             [networkQueue addOperation:[PithosUtilities prepareRequest:newObjectRequest priority:[[newObjectRequest.userInfo objectForKey:@"priority"] integerValue]]];
         } else {
-            if (newSyncRequested) {
-                dispatch_async(dispatch_get_main_queue(), ^{
-                    [activityFacility endActivity:activity 
-                                      withMessage:[containerRequest.userInfo objectForKey:@"stoppedActivityMessage"]];
-                });
-                @synchronized(self) {
-                    syncIncomplete = YES;
-                    [self decreaseSyncOperationCount];
-                    if (!syncOperationCount)
-                        [self sync];
-                }
-                [pool drain];
-                return;
+            if (newSyncRequested || syncLate || operation.isCancelled) {
+                [self requestFailed:containerRequest];
             } else {
                 __block ASIPithosContainerRequest *newContainerRequest = [PithosUtilities updateContainerDataRequestWithPithos:pithos 
                                                                                                                  containerName:containerName
@@ -1717,27 +1797,17 @@
 
 - (void)requestFailed:(ASIPithosRequest *)request {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    if ([request isCancelled]) {
-        dispatch_async(dispatch_get_main_queue(), ^{
-            [activityFacility endActivity:[request.userInfo objectForKey:@"activity"] 
-                              withMessage:[request.userInfo objectForKey:@"stoppedActivityMessage"]];
-        });
-        syncIncomplete = YES;
-        [self decreaseSyncOperationCount];
+    NSOperation *operation = [request.userInfo objectForKey:@"operation"];
+    if (operation.isCancelled) {
         [pool drain];
-        return;
+        return;        
     }
-    if (newSyncRequested) {
+    if (request.isCancelled || newSyncRequested || syncLate) {
         dispatch_async(dispatch_get_main_queue(), ^{
             [activityFacility endActivity:[request.userInfo objectForKey:@"activity"] 
                               withMessage:[request.userInfo objectForKey:@"stoppedActivityMessage"]];
         });
-        @synchronized(self) {
-            syncIncomplete = YES;
-            [self decreaseSyncOperationCount];
-            if (!syncOperationCount)
-                [self sync];
-        }
+        [self syncOperationFinishedWithSuccess:NO];
         [pool drain];
         return;
     }
@@ -1751,8 +1821,7 @@
             [activityFacility endActivity:[request.userInfo objectForKey:@"activity"] 
                               withMessage:[request.userInfo objectForKey:@"failedActivityMessage"]];
         });
-        syncIncomplete = YES;
-        [self decreaseSyncOperationCount];
+        [self syncOperationFinishedWithSuccess:NO];
     }
     [pool drain];
 }
diff --git a/pithos-macos/PithosUtilities.m b/pithos-macos/PithosUtilities.m
index 769b86b..540262a 100644
--- a/pithos-macos/PithosUtilities.m
+++ b/pithos-macos/PithosUtilities.m
@@ -36,6 +36,7 @@
 // or implied, of GRNET S.A.
 
 #import "PithosUtilities.h"
+#import "ASINetworkQueue.h"
 #import "ASIPithos.h"
 #import "ASIPithosContainerRequest.h"
 #import "ASIPithosObjectRequest.h"
@@ -908,10 +909,9 @@
                                                                                          objectName:objectName];
     if (sharingAccount)
         [objectRequest setRequestUserFromDefaultTo:sharingAccount withPithos:pithos];
-    [[PithosUtilities prepareRequest:objectRequest priority:NSOperationQueuePriorityVeryHigh] startAsynchronous];
-    while (![objectRequest isFinished]) {
-        usleep(1);
-    }
+    ASINetworkQueue *networkQueue = [ASINetworkQueue queue];
+    [networkQueue go];
+    [networkQueue addOperations:[NSArray arrayWithObject:[PithosUtilities prepareRequest:objectRequest]] waitUntilFinished:YES];
     *error = [objectRequest error];
     if (*error) {
         [self httpRequestErrorAlertWithRequest:objectRequest];
@@ -975,10 +975,9 @@
                                                                                                         until:nil];
         if (sharingAccount)
             [containerRequest setRequestUserFromDefaultTo:sharingAccount withPithos:pithos];
-        [[PithosUtilities prepareRequest:containerRequest priority:NSOperationQueuePriorityVeryHigh] startAsynchronous];
-        while (![containerRequest isFinished]) {
-            usleep(1);
-        }
+        ASINetworkQueue *networkQueue = [ASINetworkQueue queue];
+        [networkQueue go];
+        [networkQueue addOperations:[NSArray arrayWithObject:[PithosUtilities prepareRequest:containerRequest]] waitUntilFinished:YES];
         if ([containerRequest error]) {
             [self httpRequestErrorAlertWithRequest:containerRequest];
             return nil;
diff --git a/pithos-macos/PublicURLTransformer.m b/pithos-macos/PublicURLTransformer.m
index 7f14fd5..928f0f7 100644
--- a/pithos-macos/PublicURLTransformer.m
+++ b/pithos-macos/PublicURLTransformer.m
@@ -39,6 +39,7 @@
 #import "ASIPithosRequest.h"
 #import "ASIPithos.h"
 #import "pithos_macosAppDelegate.h"
+#import "PithosAccount.h"
 
 @implementation PublicURLTransformer
 
@@ -53,7 +54,7 @@
 - (id)transformedValue:(id)value {
     if (value == nil)
 		return nil;
-    return [[[(pithos_macosAppDelegate *)[[NSApplication sharedApplication] delegate] pithos] publicURLPrefix] 
+    return [[[[(pithos_macosAppDelegate *)[[NSApplication sharedApplication] delegate] currentPithosAccount] pithos] publicURLPrefix] 
             stringByAppendingString:(NSString *)value];
 }
 
diff --git a/pithos-macos/en.lproj/MainMenu.xib b/pithos-macos/en.lproj/MainMenu.xib
index 208e238..7ba571e 100644
--- a/pithos-macos/en.lproj/MainMenu.xib
+++ b/pithos-macos/en.lproj/MainMenu.xib
@@ -2,10 +2,10 @@
 <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
 	<data>
 		<int key="IBDocument.SystemTarget">1070</int>
-		<string key="IBDocument.SystemVersion">11C74</string>
+		<string key="IBDocument.SystemVersion">11D50b</string>
 		<string key="IBDocument.InterfaceBuilderVersion">1938</string>
-		<string key="IBDocument.AppKitVersion">1138.23</string>
-		<string key="IBDocument.HIToolboxVersion">567.00</string>
+		<string key="IBDocument.AppKitVersion">1138.32</string>
+		<string key="IBDocument.HIToolboxVersion">568.00</string>
 		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
 			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
 			<string key="NS.object.0">1938</string>
@@ -1345,32 +1345,35 @@
 						<reference key="NSOnImage" ref="35465992"/>
 						<reference key="NSMixedImage" ref="502551668"/>
 					</object>
-					<object class="NSMenuItem" id="137964154">
+					<object class="NSMenuItem" id="483648450">
 						<reference key="NSMenu" ref="143458898"/>
-						<bool key="NSIsDisabled">YES</bool>
-						<bool key="NSIsSeparator">YES</bool>
-						<string key="NSTitle"/>
+						<string key="NSTitle">Select Account</string>
 						<string key="NSKeyEquiv"/>
 						<int key="NSMnemonicLoc">2147483647</int>
 						<reference key="NSOnImage" ref="35465992"/>
 						<reference key="NSMixedImage" ref="502551668"/>
+						<string key="NSAction">submenuAction:</string>
+						<object class="NSMenu" key="NSSubmenu" id="335350947">
+							<string key="NSTitle">Select Account</string>
+							<object class="NSMutableArray" key="NSMenuItems">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+							</object>
+						</object>
 					</object>
 					<object class="NSMenuItem" id="62426625">
 						<reference key="NSMenu" ref="143458898"/>
-						<bool key="NSIsDisabled">YES</bool>
-						<string key="NSTitle">Last Sync: Today, 3:30PM</string>
-						<string key="NSKeyEquiv"/>
-						<int key="NSMnemonicLoc">2147483647</int>
-						<reference key="NSOnImage" ref="35465992"/>
-						<reference key="NSMixedImage" ref="502551668"/>
-					</object>
-					<object class="NSMenuItem" id="575253026">
-						<reference key="NSMenu" ref="143458898"/>
-						<string key="NSTitle">Sync Now</string>
+						<string key="NSTitle">Last Sync</string>
 						<string key="NSKeyEquiv"/>
 						<int key="NSMnemonicLoc">2147483647</int>
 						<reference key="NSOnImage" ref="35465992"/>
 						<reference key="NSMixedImage" ref="502551668"/>
+						<string key="NSAction">submenuAction:</string>
+						<object class="NSMenu" key="NSSubmenu" id="1024701191">
+							<string key="NSTitle">Last Sync</string>
+							<object class="NSMutableArray" key="NSMenuItems">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+							</object>
+						</object>
 					</object>
 					<object class="NSMenuItem" id="241391296">
 						<reference key="NSMenu" ref="143458898"/>
@@ -2154,12 +2157,20 @@
 					<int key="connectionID">556</int>
 				</object>
 				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">syncNow:</string>
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">accountsMenu</string>
+						<reference key="source" ref="976324537"/>
+						<reference key="destination" ref="335350947"/>
+					</object>
+					<int key="connectionID">596</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">lastSyncMenu</string>
 						<reference key="source" ref="976324537"/>
-						<reference key="destination" ref="575253026"/>
+						<reference key="destination" ref="1024701191"/>
 					</object>
-					<int key="connectionID">561</int>
+					<int key="connectionID">600</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBBindingConnection" key="connection">
@@ -2214,48 +2225,28 @@
 					<int key="connectionID">575</int>
 				</object>
 				<object class="IBConnectionRecord">
-					<object class="IBBindingConnection" key="connection">
-						<string key="label">title: delegate.pithosSyncDaemon.lastCompletedSync</string>
-						<reference key="source" ref="62426625"/>
-						<reference key="destination" ref="1050"/>
-						<object class="NSNibBindingConnector" key="connector">
-							<reference key="NSSource" ref="62426625"/>
-							<reference key="NSDestination" ref="1050"/>
-							<string key="NSLabel">title: delegate.pithosSyncDaemon.lastCompletedSync</string>
-							<string key="NSBinding">title</string>
-							<string key="NSKeyPath">delegate.pithosSyncDaemon.lastCompletedSync</string>
-							<object class="NSDictionary" key="NSOptions">
-								<string key="NS.key.0">NSValueTransformerName</string>
-								<string key="NS.object.0">LastCompletedSyncTransformer</string>
-							</object>
-							<int key="NSNibBindingConnectorVersion">2</int>
-						</object>
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">pithosBrowserController</string>
+						<reference key="source" ref="726846575"/>
+						<reference key="destination" ref="462345653"/>
 					</object>
-					<int key="connectionID">565</int>
+					<int key="connectionID">559</int>
 				</object>
 				<object class="IBConnectionRecord">
-					<object class="IBBindingConnection" key="connection">
-						<string key="label">enabled: delegate.alwaysNo</string>
-						<reference key="source" ref="62426625"/>
-						<reference key="destination" ref="1050"/>
-						<object class="NSNibBindingConnector" key="connector">
-							<reference key="NSSource" ref="62426625"/>
-							<reference key="NSDestination" ref="1050"/>
-							<string key="NSLabel">enabled: delegate.alwaysNo</string>
-							<string key="NSBinding">enabled</string>
-							<string key="NSKeyPath">delegate.alwaysNo</string>
-							<int key="NSNibBindingConnectorVersion">2</int>
-						</object>
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">delegate</string>
+						<reference key="source" ref="335350947"/>
+						<reference key="destination" ref="976324537"/>
 					</object>
-					<int key="connectionID">569</int>
+					<int key="connectionID">593</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
-						<string key="label">pithosBrowserController</string>
-						<reference key="source" ref="726846575"/>
-						<reference key="destination" ref="462345653"/>
+						<string key="label">delegate</string>
+						<reference key="source" ref="1024701191"/>
+						<reference key="destination" ref="976324537"/>
 					</object>
-					<int key="connectionID">559</int>
+					<int key="connectionID">599</int>
 				</object>
 			</object>
 			<object class="IBMutableOrderedSet" key="objectRecords">
@@ -3300,13 +3291,12 @@
 							<reference ref="1057169541"/>
 							<reference ref="241391296"/>
 							<reference ref="629835270"/>
-							<reference ref="575253026"/>
 							<reference ref="62426625"/>
 							<reference ref="276704768"/>
-							<reference ref="137964154"/>
 							<reference ref="440755703"/>
 							<reference ref="153366749"/>
 							<reference ref="75733682"/>
+							<reference ref="483648450"/>
 						</object>
 						<reference key="parent" ref="0"/>
 					</object>
@@ -3326,13 +3316,12 @@
 						<reference key="parent" ref="143458898"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">539</int>
-						<reference key="object" ref="575253026"/>
-						<reference key="parent" ref="143458898"/>
-					</object>
-					<object class="IBObjectRecord">
 						<int key="objectID">540</int>
 						<reference key="object" ref="62426625"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="1024701191"/>
+						</object>
 						<reference key="parent" ref="143458898"/>
 					</object>
 					<object class="IBObjectRecord">
@@ -3341,11 +3330,6 @@
 						<reference key="parent" ref="143458898"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">542</int>
-						<reference key="object" ref="137964154"/>
-						<reference key="parent" ref="143458898"/>
-					</object>
-					<object class="IBObjectRecord">
 						<int key="objectID">543</int>
 						<reference key="object" ref="440755703"/>
 						<reference key="parent" ref="143458898"/>
@@ -3358,6 +3342,9 @@
 					<object class="IBObjectRecord">
 						<int key="objectID">545</int>
 						<reference key="object" ref="75733682"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+						</object>
 						<reference key="parent" ref="143458898"/>
 					</object>
 					<object class="IBObjectRecord">
@@ -3371,6 +3358,27 @@
 						<reference key="object" ref="796122129"/>
 						<reference key="parent" ref="0"/>
 					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">591</int>
+						<reference key="object" ref="483648450"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="335350947"/>
+						</object>
+						<reference key="parent" ref="143458898"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">592</int>
+						<reference key="object" ref="335350947"/>
+						<reference key="parent" ref="483648450"/>
+						<string key="objectName">Menu - Accounts</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">598</int>
+						<reference key="object" ref="1024701191"/>
+						<reference key="parent" ref="62426625"/>
+						<string key="objectName">Menu - Last Sync Dates</string>
+					</object>
 				</object>
 			</object>
 			<object class="NSMutableDictionary" key="flattenedProperties">
@@ -3517,10 +3525,8 @@
 					<string>536.IBPluginDependency</string>
 					<string>537.IBPluginDependency</string>
 					<string>538.IBPluginDependency</string>
-					<string>539.IBPluginDependency</string>
 					<string>540.IBPluginDependency</string>
 					<string>541.IBPluginDependency</string>
-					<string>542.IBPluginDependency</string>
 					<string>543.IBPluginDependency</string>
 					<string>544.IBPluginDependency</string>
 					<string>545.IBPluginDependency</string>
@@ -3529,6 +3535,11 @@
 					<string>57.IBPluginDependency</string>
 					<string>576.IBPluginDependency</string>
 					<string>58.IBPluginDependency</string>
+					<string>591.IBPluginDependency</string>
+					<string>592.IBAttributePlaceholdersKey</string>
+					<string>592.IBPluginDependency</string>
+					<string>598.IBAttributePlaceholdersKey</string>
+					<string>598.IBPluginDependency</string>
 					<string>72.IBPluginDependency</string>
 					<string>73.IBPluginDependency</string>
 					<string>74.IBPluginDependency</string>
@@ -3695,6 +3706,17 @@
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<object class="NSMutableDictionary">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<reference key="dict.sortedKeys" ref="0"/>
+						<reference key="dict.values" ref="0"/>
+					</object>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<object class="NSMutableDictionary">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<reference key="dict.sortedKeys" ref="0"/>
+						<reference key="dict.values" ref="0"/>
+					</object>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -3722,9 +3744,436 @@
 				<reference key="dict.values" ref="0"/>
 			</object>
 			<nil key="sourceID"/>
-			<int key="maxID">580</int>
+			<int key="maxID">600</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSDocument</string>
+					<object class="NSMutableDictionary" key="actions">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>printDocument:</string>
+							<string>revertDocumentToSaved:</string>
+							<string>runPageLayout:</string>
+							<string>saveDocument:</string>
+							<string>saveDocumentAs:</string>
+							<string>saveDocumentTo:</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="actionInfosByName">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>printDocument:</string>
+							<string>revertDocumentToSaved:</string>
+							<string>runPageLayout:</string>
+							<string>saveDocument:</string>
+							<string>saveDocumentAs:</string>
+							<string>saveDocumentTo:</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBActionInfo">
+								<string key="name">printDocument:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">revertDocumentToSaved:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">runPageLayout:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">saveDocument:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">saveDocumentAs:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">saveDocumentTo:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./Classes/NSDocument.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">PithosBrowserController</string>
+					<string key="superclassName">NSWindowController</string>
+					<object class="NSMutableDictionary" key="actions">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>forceRefresh:</string>
+							<string>refresh:</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>id</string>
+							<string>id</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="actionInfosByName">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>forceRefresh:</string>
+							<string>refresh:</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBActionInfo">
+								<string key="name">forceRefresh:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">refresh:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="outlets">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>activityProgressIndicator</string>
+							<string>activityTextField</string>
+							<string>browser</string>
+							<string>browserMenu</string>
+							<string>horizontalSplitView</string>
+							<string>leftBottomView</string>
+							<string>leftTopView</string>
+							<string>outlineView</string>
+							<string>outlineViewMenu</string>
+							<string>verticalSplitView</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>NSProgressIndicator</string>
+							<string>NSTextField</string>
+							<string>NSBrowser</string>
+							<string>NSMenu</string>
+							<string>NSSplitView</string>
+							<string>NSView</string>
+							<string>NSView</string>
+							<string>NSOutlineView</string>
+							<string>NSMenu</string>
+							<string>NSSplitView</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="toOneOutletInfosByName">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>activityProgressIndicator</string>
+							<string>activityTextField</string>
+							<string>browser</string>
+							<string>browserMenu</string>
+							<string>horizontalSplitView</string>
+							<string>leftBottomView</string>
+							<string>leftTopView</string>
+							<string>outlineView</string>
+							<string>outlineViewMenu</string>
+							<string>verticalSplitView</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBToOneOutletInfo">
+								<string key="name">activityProgressIndicator</string>
+								<string key="candidateClassName">NSProgressIndicator</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">activityTextField</string>
+								<string key="candidateClassName">NSTextField</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">browser</string>
+								<string key="candidateClassName">NSBrowser</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">browserMenu</string>
+								<string key="candidateClassName">NSMenu</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">horizontalSplitView</string>
+								<string key="candidateClassName">NSSplitView</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">leftBottomView</string>
+								<string key="candidateClassName">NSView</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">leftTopView</string>
+								<string key="candidateClassName">NSView</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">outlineView</string>
+								<string key="candidateClassName">NSOutlineView</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">outlineViewMenu</string>
+								<string key="candidateClassName">NSMenu</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">verticalSplitView</string>
+								<string key="candidateClassName">NSSplitView</string>
+							</object>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./Classes/PithosBrowserController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">PithosPreferencesController</string>
+					<string key="superclassName">NSWindowController</string>
+					<object class="NSMutableDictionary" key="actions">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>addAccount:</string>
+							<string>groupsApply:</string>
+							<string>groupsRevert:</string>
+							<string>login:</string>
+							<string>loginCancel:</string>
+							<string>removeAccount:</string>
+							<string>syncApply:</string>
+							<string>syncCancel:</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="actionInfosByName">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>addAccount:</string>
+							<string>groupsApply:</string>
+							<string>groupsRevert:</string>
+							<string>login:</string>
+							<string>loginCancel:</string>
+							<string>removeAccount:</string>
+							<string>syncApply:</string>
+							<string>syncCancel:</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBActionInfo">
+								<string key="name">addAccount:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">groupsApply:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">groupsRevert:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">login:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">loginCancel:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">removeAccount:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">syncApply:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">syncCancel:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="outlets">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>accountsArrayController</string>
+							<string>groupsDictionaryController</string>
+							<string>pithosBrowserController</string>
+							<string>selectedGroupMembersDictionaryController</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>NSArrayController</string>
+							<string>NSDictionaryController</string>
+							<string>PithosBrowserController</string>
+							<string>NSDictionaryController</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="toOneOutletInfosByName">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>accountsArrayController</string>
+							<string>groupsDictionaryController</string>
+							<string>pithosBrowserController</string>
+							<string>selectedGroupMembersDictionaryController</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBToOneOutletInfo">
+								<string key="name">accountsArrayController</string>
+								<string key="candidateClassName">NSArrayController</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">groupsDictionaryController</string>
+								<string key="candidateClassName">NSDictionaryController</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">pithosBrowserController</string>
+								<string key="candidateClassName">PithosBrowserController</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">selectedGroupMembersDictionaryController</string>
+								<string key="candidateClassName">NSDictionaryController</string>
+							</object>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./Classes/PithosPreferencesController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">pithos_macosAppDelegate</string>
+					<string key="superclassName">NSObject</string>
+					<object class="NSMutableDictionary" key="actions">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>aboutPithos:</string>
+							<string>showPithosBrowser:</string>
+							<string>showPithosPreferences:</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="actionInfosByName">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>aboutPithos:</string>
+							<string>showPithosBrowser:</string>
+							<string>showPithosPreferences:</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBActionInfo">
+								<string key="name">aboutPithos:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">showPithosBrowser:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">showPithosPreferences:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="outlets">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>accountsMenu</string>
+							<string>lastSyncMenu</string>
+							<string>pithosBrowserController</string>
+							<string>pithosPreferencesController</string>
+							<string>statusMenu</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>NSMenu</string>
+							<string>NSMenu</string>
+							<string>PithosBrowserController</string>
+							<string>PithosPreferencesController</string>
+							<string>NSMenu</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="toOneOutletInfosByName">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>accountsMenu</string>
+							<string>lastSyncMenu</string>
+							<string>pithosBrowserController</string>
+							<string>pithosPreferencesController</string>
+							<string>statusMenu</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBToOneOutletInfo">
+								<string key="name">accountsMenu</string>
+								<string key="candidateClassName">NSMenu</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">lastSyncMenu</string>
+								<string key="candidateClassName">NSMenu</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">pithosBrowserController</string>
+								<string key="candidateClassName">PithosBrowserController</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">pithosPreferencesController</string>
+								<string key="candidateClassName">PithosPreferencesController</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">statusMenu</string>
+								<string key="candidateClassName">NSMenu</string>
+							</object>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./Classes/pithos_macosAppDelegate.h</string>
+					</object>
+				</object>
+			</object>
 		</object>
-		<object class="IBClassDescriber" key="IBDocument.Classes"/>
 		<int key="IBDocument.localizationMode">0</int>
 		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
 		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
@@ -3742,8 +4191,8 @@
 			</object>
 			<object class="NSMutableArray" key="dict.values">
 				<bool key="EncodedWithXMLCoder">YES</bool>
-				<string>{9, 8}</string>
-				<string>{7, 2}</string>
+				<string>{11, 11}</string>
+				<string>{10, 3}</string>
 			</object>
 		</object>
 	</data>
diff --git a/pithos-macos/pithos_macosAppDelegate.h b/pithos-macos/pithos_macosAppDelegate.h
index 16ad2da..3545189 100644
--- a/pithos-macos/pithos_macosAppDelegate.h
+++ b/pithos-macos/pithos_macosAppDelegate.h
@@ -38,39 +38,47 @@
 #import <Cocoa/Cocoa.h>
 @class PithosBrowserController;
 @class PithosPreferencesController;
-@class PithosSyncDaemon;
-@class ASIPithos;
+@class PithosAccount;
 
 @interface pithos_macosAppDelegate : NSObject <NSApplicationDelegate> {
     IBOutlet PithosBrowserController *pithosBrowserController;
     IBOutlet PithosPreferencesController *pithosPreferencesController;
     
-    PithosSyncDaemon *pithosSyncDaemon;
     BOOL alwaysNo;
     
-    ASIPithos *pithos;
-
     IBOutlet NSMenu *statusMenu;
+    IBOutlet NSMenu *accountsMenu;
+    IBOutlet NSMenu *lastSyncMenu;
     NSStatusItem *statusItem;
     
     NSString *aboutVersion;
     
     NSUserDefaults *userDefaults;
+    
+    BOOL activated;
+    PithosAccount *currentPithosAccount;
+    NSMutableArray *pithosAccounts;
+    NSMutableDictionary *pithosAccountsDictionary;
+    
+    NSTimeInterval syncTimeInterval;
+    NSTimer *syncTimer;
+    PithosAccount *syncPithosAccount;
 }
 
+@property (nonatomic, retain) PithosBrowserController *pithosBrowserController;
+@property (nonatomic, assign) BOOL alwaysNo;
+@property (nonatomic, readonly) NSString *aboutVersion;
+@property (nonatomic, assign) BOOL activated;
+@property (nonatomic, retain) PithosAccount *currentPithosAccount;
+@property (nonatomic, retain) NSMutableArray *pithosAccounts;
+@property (nonatomic, readonly) NSMutableDictionary *pithosAccountsDictionary;
+@property (nonatomic, retain) PithosAccount *syncPithosAccount;
+
 - (void)handleAppleEvent:(NSAppleEventDescriptor *)event withReplyEvent: (NSAppleEventDescriptor *)replyEvent;
 - (IBAction)showPithosBrowser:(id)sender;
 - (IBAction)showPithosPreferences:(id)sender;
 - (IBAction)aboutPithos:(id)sender;
-- (IBAction)syncNow:(id)sender;
-
-- (void)login;
-- (void)authenticate;
-
-@property (nonatomic, retain) ASIPithos *pithos;
-@property (nonatomic, retain) PithosBrowserController *pithosBrowserController;
-@property (nonatomic, retain) PithosSyncDaemon *pithosSyncDaemon;
-@property (nonatomic, assign) BOOL alwaysNo;
-@property (nonatomic, readonly) NSString *aboutVersion;
+- (void)savePithosAccounts:(id)sender;
+- (void)removedPithosAccount:(PithosAccount *)removedPithosAccount;
 
 @end
diff --git a/pithos-macos/pithos_macosAppDelegate.m b/pithos-macos/pithos_macosAppDelegate.m
index fda2640..e52fe17 100644
--- a/pithos-macos/pithos_macosAppDelegate.m
+++ b/pithos-macos/pithos_macosAppDelegate.m
@@ -36,79 +36,78 @@
 // or implied, of GRNET S.A.
 
 #import "pithos_macosAppDelegate.h"
+#import "PithosAccount.h"
 #import "PithosBrowserController.h"
 #import "PithosPreferencesController.h"
 #import "PithosSyncDaemon.h"
 #import "ASIPithosRequest.h"
 #import "ASIPithos.h"
 #import "ASIDownloadCache.h"
+#import "LastCompletedSyncTransformer.h"
 
 @implementation pithos_macosAppDelegate
-@synthesize pithos, pithosBrowserController, pithosSyncDaemon, alwaysNo, aboutVersion;
+@synthesize pithosBrowserController, alwaysNo, aboutVersion, activated, currentPithosAccount, pithosAccounts, pithosAccountsDictionary, syncPithosAccount;
 
 - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
-    userDefaults = [[NSUserDefaults standardUserDefaults] retain];
-    NSString *stringURL;
-    NSURL *testURL;
+    [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self 
+                                                       andSelector:@selector(handleAppleEvent:withReplyEvent:) 
+                                                     forEventClass:kInternetEventClass 
+                                                        andEventID:kAEGetURL];
     
-    stringURL = [userDefaults stringForKey:@"storageURLPrefix"];
-    testURL = (stringURL) ? [NSURL URLWithString:stringURL] : nil;
-    if (!testURL || !testURL.scheme || !testURL.host)
-        [userDefaults setObject:@"https://plus.pithos.grnet.gr/v1" forKey:@"storageURLPrefix"];
-
-    stringURL = [userDefaults stringForKey:@"publicURLPrefix"];
-    testURL = (stringURL) ? [NSURL URLWithString:stringURL] : nil;
-    if (!testURL || !testURL.scheme || !testURL.host)
-        [userDefaults setObject:@"https://plus.pithos.grnet.gr" forKey:@"publicURLPrefix"];
-        
-    stringURL = [userDefaults stringForKey:@"loginURLPrefix"];
-    testURL = (stringURL) ? [NSURL URLWithString:stringURL] : nil;
-    if (!testURL || !testURL.scheme || !testURL.host)
-        [userDefaults setObject:@"https://plus.pithos.grnet.gr/login" forKey:@"loginURLPrefix"];
+    userDefaults = [[NSUserDefaults standardUserDefaults] retain];
 
-    stringURL = [userDefaults stringForKey:@"aboutURL"];
-    testURL = (stringURL) ? [NSURL URLWithString:stringURL] : nil;
-    if (!testURL || !testURL.scheme || !testURL.host)
-        [userDefaults setObject:@"https://pithos.dev.grnet.gr/docs" forKey:@"aboutURL"];
+    NSString *stringURL = [userDefaults stringForKey:@"aboutURL"];
+    NSURL *testURL = (stringURL) ? [NSURL URLWithString:stringURL] : nil;
+    if (!testURL || !testURL.scheme || !testURL.host) {
+        [userDefaults setObject:@"https://pithos.dev.grnet.gr/docs/pithos" forKey:@"aboutURL"];
+        [userDefaults synchronize];
+    }
     
-    NSString *syncDirectoryPath = [userDefaults stringForKey:@"syncDirectoryPath"];
-    if (!syncDirectoryPath || ![syncDirectoryPath length]) {
-        syncDirectoryPath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:@"Pithos"];
-    } else {
-        NSFileManager *fileManager = [NSFileManager defaultManager];
-        BOOL isDirectory;
-        BOOL fileExists = [fileManager fileExistsAtPath:syncDirectoryPath isDirectory:&isDirectory];
-        NSError *error = nil;
-        if ((fileExists && !isDirectory) || 
-            (!fileExists && (![fileManager createDirectoryAtPath:syncDirectoryPath withIntermediateDirectories:YES attributes:nil error:&error] || error))) {
-            syncDirectoryPath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:@"Pithos"];
-        }   
+    syncTimeInterval = [userDefaults doubleForKey:@"syncTimeInterval"];
+    if (syncTimeInterval <= 0.0) {
+        syncTimeInterval = 180.0;
+        [userDefaults setDouble:syncTimeInterval forKey:@"syncTimeInterval"];
+        [userDefaults synchronize];
     }
-    [userDefaults setObject:syncDirectoryPath forKey:@"syncDirectoryPath"];
     
-    NSString *syncContainerName = [userDefaults stringForKey:@"syncContainerName"];
-    if (!syncContainerName || ![syncContainerName length] || [syncContainerName isEqualToString:@"trash"])
-        [userDefaults setObject:@"pithos" forKey:@"syncContainerName"];
-
-    double syncTimeInterval = [userDefaults doubleForKey:@"syncTimeInterval"];
-    if (syncTimeInterval <= 0)
-        [userDefaults setDouble:180.0 forKey:@"syncTimeInterval"];
+    NSData *tmpData = [userDefaults objectForKey:@"pithosAccounts"];
+    NSArray *tmpArray;
+    if (tmpData && (tmpArray = [NSKeyedUnarchiver unarchiveObjectWithData:tmpData]))
+        self.pithosAccounts = [NSMutableArray arrayWithArray:tmpArray];
+    else
+        self.pithosAccounts = [NSMutableArray array];
     
-    [userDefaults synchronize];
+    if (![pithosAccounts count]) {
+        [pithosAccounts addObject:[PithosAccount pithosAccount]];
+        self.pithosAccounts = self.pithosAccounts;
+    } else {
+        self.activated = YES;
+    }
     
-    [userDefaults addObserver:self 
-                   forKeyPath:@"syncDirectoryPath"
-                      options:NSKeyValueObservingOptionNew
-                      context:NULL];
-     
-    [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self 
-                                                       andSelector:@selector(handleAppleEvent:withReplyEvent:) 
-                                                     forEventClass:kInternetEventClass 
-                                                        andEventID:kAEGetURL];
+    pithosAccountsDictionary = [[NSMutableDictionary alloc] initWithCapacity:[pithosAccounts count]];
+    for (PithosAccount *pithosAccount in pithosAccounts) {
+        [pithosAccountsDictionary setObject:pithosAccount forKey:pithosAccount.name];
+        if (!currentPithosAccount && pithosAccount.active)
+            currentPithosAccount = [pithosAccount retain];
+    }
+    if (!currentPithosAccount)
+        self.currentPithosAccount = [pithosAccounts objectAtIndex:0];
     
-    [self showPithosBrowser:self];
-    self.pithos = [ASIPithos pithos];
-    [self authenticate];
+    if (currentPithosAccount.active) {
+        [self savePithosAccounts:self];
+        [self showPithosBrowser:self];
+        pithosBrowserController.pithos = currentPithosAccount.pithos;
+    } else {
+        // XXX maybe call specifically to go to new account tab
+        [self showPithosPreferences:self];
+    }
+
+    syncTimer = [[NSTimer scheduledTimerWithTimeInterval:syncTimeInterval 
+                                                  target:self 
+                                                selector:@selector(sync) 
+                                                userInfo:nil 
+                                                 repeats:YES] retain];
+    [syncTimer fire];
 }
 
 // Based on: http://cocoatutorial.grapewave.com/2010/01/creating-a-status-bar-application/
@@ -135,9 +134,10 @@
     NSURL *url = [NSURL URLWithString:[[event paramDescriptorForKeyword:keyDirectObject] stringValue]];
     NSString *host = [url host];
 	NSString *query = [url query];
-    NSLog(@"host : '%@', query: '%@'", host, query);
+    PithosAccount *pithosAccount = [pithosAccountsDictionary objectForKey:[url lastPathComponent]];
     NSProcessInfo *processInfo = [NSProcessInfo processInfo];
-    if ([host isEqualToString:[NSString stringWithFormat:@"%@_%d", [processInfo processName], [processInfo processIdentifier]]] && query) {
+    if ([host isEqualToString:[NSString stringWithFormat:@"%@_%d", [processInfo processName], [processInfo processIdentifier]]] && 
+        pithosAccount && query) {
         // user=
         NSString *authUser;
         NSRange userRange = [query rangeOfString:@"user=" options:NSCaseInsensitiveSearch];
@@ -173,28 +173,40 @@
         
         NSLog(@"query authUser: '%@', authToken: '%@'", authUser, authToken);
         if ([authUser length] && [authToken length]) {
-            [userDefaults setObject:authUser forKey:@"authUser"];
-            [userDefaults setObject:authToken forKey:@"authToken"];
-            [userDefaults synchronize];
-
-            [self authenticate];
+            [pithosAccount authenticateWithServerURL:nil authUser:authUser authToken:authToken];
+            [self savePithosAccounts:self];
+            if (pithosPreferencesController && [pithosPreferencesController.selectedPithosAccount isEqualTo:pithosAccount]) {
+                pithosPreferencesController.authUser = pithosAccount.authUser;
+                pithosPreferencesController.authToken = pithosAccount.authToken;
+            }
+            self.activated = YES;
+            if ([pithosAccount isEqualTo:currentPithosAccount]) {
+                [self showPithosBrowser:self];
+                pithosBrowserController.pithos = pithosAccount.pithos;
+            }
         }
         // XXX else maybe show an error message?
     }
     // XXX else maybe show an error message?
 }
 
-#pragma mark -
-#pragma Observers
-
-- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
-    if ([object isEqualTo:userDefaults] && [keyPath isEqualToString:@"syncDirectoryPath"]) {
-        [self authenticate];
+- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender {
+    [self savePithosAccounts:self];
+    if ([self.pithosBrowserController operationsPending]) {
+        NSAlert *alert = [[[NSAlert alloc] init] autorelease];
+        [alert setMessageText:@"Pending Operations"];
+        [alert setInformativeText:@"There are pending operations in the browser, do you want to quit and cancel them?"];
+        [alert addButtonWithTitle:@"OK"];
+        [alert addButtonWithTitle:@"Cancel"];
+        NSInteger choice = [alert runModal];
+        if (choice == NSAlertSecondButtonReturn) 
+            return NSTerminateCancel;
     }
+    return NSTerminateNow;
 }
 
 #pragma mark -
-#pragma Properties
+#pragma mark Properties
 
 - (NSString *)aboutVersion {
     return [NSString stringWithFormat:@"About Pithos+ %@ (%@)", 
@@ -203,9 +215,52 @@
 }
 
 #pragma mark -
-#pragma Actions
+#pragma mark NSMenuDelegate
+
+- (void)menuNeedsUpdate:(NSMenu *)menu {
+    NSMenuItem *menuItem;
+    [menu removeAllItems];
+    if ([menu isEqualTo:accountsMenu]) {
+        [menu setAutoenablesItems:NO];
+        for (PithosAccount *pithosAccount in pithosAccounts) {
+            menuItem = [[[NSMenuItem alloc] initWithTitle:pithosAccount.name 
+                                                   action:@selector(menuChangePithosAccount:) 
+                                            keyEquivalent:@""] autorelease];
+            [menuItem setRepresentedObject:pithosAccount];
+            [menuItem setEnabled:pithosAccount.active];
+            [menuItem setState:((pithosAccount.active && [currentPithosAccount isEqualTo:pithosAccount]) ? NSOnState : NSOffState)];
+            [menu addItem:menuItem];
+        }
+    } else if ([menu isEqualTo:lastSyncMenu]) {
+        NSString *menuItemTitle;
+        [menu setAutoenablesItems:NO];
+        for (PithosAccount *pithosAccount in pithosAccounts) {
+            menuItemTitle = [NSString stringWithFormat:@"%@: %@", 
+                             pithosAccount.name, 
+                             [[[[LastCompletedSyncTransformer alloc] init] autorelease] transformedValue:pithosAccount.syncLastCompleted]];
+            if ([pithosAccount isEqualTo:syncPithosAccount] && [pithosAccount.syncDaemon isSyncing])
+                menuItemTitle = [menuItemTitle stringByAppendingString:@" (syncing)"];
+            menuItem = [[[NSMenuItem alloc] initWithTitle:menuItemTitle 
+                                                   action:@selector(menuChangeSyncActive:) 
+                                            keyEquivalent:@""] autorelease];
+            [menuItem setRepresentedObject:pithosAccount];
+            [menuItem setEnabled:pithosAccount.active];
+            [menuItem setState:((pithosAccount.active && pithosAccount.syncActive) ? NSOnState : NSOffState)];
+            [menu addItem:menuItem];
+        }
+        [menu addItem:[NSMenuItem separatorItem]];
+        [menu addItem:[[[NSMenuItem alloc] initWithTitle:@"Next Sync" 
+                                                  action:@selector(sync) 
+                                           keyEquivalent:@""] autorelease]];
+    }
+}
+
+#pragma mark -
+#pragma mark Actions
 
 - (IBAction)showPithosBrowser:(id)sender {
+    if (!activated)
+        return;
     [pithosBrowserController showWindow:sender];
     [[pithosBrowserController window] makeKeyAndOrderFront:sender];
     [NSApp activateIgnoringOtherApps:YES];
@@ -221,61 +276,131 @@
     [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:[userDefaults stringForKey:@"aboutURL"]]];
 }
 
-- (IBAction)syncNow:(id)sender {
-    [pithosSyncDaemon sync];
+- (void)sync {
+    if (!activated || ![pithosAccounts count])
+        return;
+    NSUInteger syncIndex;
+    BOOL syncPithosAccountFound = [pithosAccounts containsObject:syncPithosAccount];
+    if (syncPithosAccountFound)
+         syncIndex = [pithosAccounts indexOfObject:syncPithosAccount];
+    
+    PithosAccount *singleSyncPithosAccount = nil;
+    for (PithosAccount *pithosAccount in pithosAccounts) {
+        if (!singleSyncPithosAccount && pithosAccount.active && pithosAccount.syncActive && pithosAccount.syncDaemon) {
+            singleSyncPithosAccount = pithosAccount;
+        } else if (singleSyncPithosAccount && pithosAccount.active && pithosAccount.syncActive && pithosAccount.syncDaemon) {
+            singleSyncPithosAccount = nil;
+            break;
+        }
+    }
+    
+    if (syncPithosAccount && syncPithosAccount.active && syncPithosAccount.syncActive && syncPithosAccount.syncDaemon) {
+        // An active syncDaemon was previously syncing
+        if (singleSyncPithosAccount && [singleSyncPithosAccount isEqualTo:syncPithosAccount]) {
+            // It's the only one, sync again
+            [syncPithosAccount.syncDaemon startDaemon];
+            [syncPithosAccount.syncDaemon sync];
+            return;
+        } else if ([syncPithosAccount.syncDaemon isSyncing]) {
+            // It's still syncing, mark it as late and return
+            [syncPithosAccount.syncDaemon syncLate];
+            return;
+        }
+    }
+    PithosAccount *newSyncPithosAccount = nil;
+    if (syncPithosAccountFound) {
+        for (PithosAccount *pithosAccount in [pithosAccounts objectsAtIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(syncIndex + 1, [pithosAccounts count] - syncIndex - 1)]]) {
+            if (pithosAccount.active && pithosAccount.syncActive && pithosAccount.syncDaemon) {
+                newSyncPithosAccount = pithosAccount;
+                break;
+            }
+        }
+        if (!newSyncPithosAccount) {
+            for (PithosAccount *pithosAccount in [pithosAccounts objectsAtIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, syncIndex)]]) {
+                if (pithosAccount.active && pithosAccount.syncActive && pithosAccount.syncDaemon) {
+                    newSyncPithosAccount = pithosAccount;
+                    break;
+                }
+            }
+        }
+    } else {
+        for (PithosAccount *pithosAccount in pithosAccounts) {
+            if (pithosAccount.active && pithosAccount.syncActive && pithosAccount.syncDaemon) {
+                newSyncPithosAccount = pithosAccount;
+                break;
+            }
+        }
+    }        
+    if (newSyncPithosAccount) {
+        // A different syncDaemon is found, sync it
+        self.syncPithosAccount = newSyncPithosAccount;
+        [syncPithosAccount.syncDaemon startDaemon];
+        [syncPithosAccount.syncDaemon sync];
+    } else if (syncPithosAccountFound && syncPithosAccount && syncPithosAccount.active && syncPithosAccount.syncActive && syncPithosAccount.syncDaemon) {
+        [syncPithosAccount.syncDaemon startDaemon];
+        [syncPithosAccount.syncDaemon sync];
+    } else {
+        self.syncPithosAccount = nil;
+    }
 }
 
-#pragma mark -
-#pragma Authentication
+- (void)savePithosAccounts:(id)sender {
+    [userDefaults setObject:[NSKeyedArchiver archivedDataWithRootObject:pithosAccounts] forKey:@"pithosAccounts"];
+    [userDefaults synchronize];
+}
 
-- (void)login {
-    NSProcessInfo *processInfo = [NSProcessInfo processInfo];
-    NSString *loginURL = [NSString stringWithFormat:@"%@?next=pithos://%@_%d", 
-                          [userDefaults stringForKey:@"loginURLPrefix"], [processInfo processName], [processInfo processIdentifier]];
-    NSLog(@"loginURL: %@", loginURL);
-    [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:loginURL]];
+- (void)removedPithosAccount:(PithosAccount *)removedPithosAccount {
+    if ([self.currentPithosAccount isEqualTo:removedPithosAccount]) {
+        for (PithosAccount *pithosAccount in pithosAccounts) {
+            if (pithosAccount.active) {
+                self.currentPithosAccount = pithosAccount;
+                pithosBrowserController.pithos = currentPithosAccount.pithos;
+                break;
+            }
+        }
+        if ([self.currentPithosAccount isEqualTo:removedPithosAccount]) {
+            self.activated = NO;
+            [pithosBrowserController.window close];
+            [pithosBrowserController resetBrowser];
+            self.currentPithosAccount = [pithosAccounts objectAtIndex:0];
+        }
+    }
+    if ([self.syncPithosAccount isEqualTo:removedPithosAccount])
+        self.syncPithosAccount = nil;
 }
 
-- (void)authenticate {
-    NSString *authUser = [userDefaults stringForKey:@"authUser"];
-    NSString *authToken = [userDefaults stringForKey:@"authToken"];
-    NSString *storageURLPrefix = [userDefaults stringForKey:@"storageURLPrefix"];
-    NSString *publicURLPrefix = [userDefaults stringForKey:@"publicURLPrefix"];
-    NSString *syncDirectoryPath = [userDefaults stringForKey:@"syncDirectoryPath"];
-    NSString *syncContainerName = [userDefaults stringForKey:@"syncContainerName"];
-    double syncTimeInterval = [userDefaults doubleForKey:@"syncTimeInterval"];
-    NSLog(@"Authentication - storageURLPrefix:%@, authUser:%@, authToken:%@", storageURLPrefix, authUser, authToken);
-    if (([authUser length] == 0) || ([authToken length] == 0)) {
-        [self showPithosPreferences:self];
-    } else if ([authUser length] && [authToken length] && 
-               (![pithos.authUser isEqualToString:authUser] || ![pithos.authToken isEqualToString:authToken])) {
-        [userDefaults setObject:authUser forKey:@"previousAuthUser"];
-        [userDefaults setObject:authToken forKey:@"previousAuthToken"];
-        
-        [[ASIDownloadCache sharedCache] clearCachedResponsesForStoragePolicy:ASICacheForSessionDurationCacheStoragePolicy];
-        [[ASIPithosRequest sharedQueue] cancelAllOperations];
-        
-        ASIPithos *newPithos = [ASIPithos pithos];
-        newPithos.authURL = storageURLPrefix;
-        newPithos.storageURLPrefix = storageURLPrefix;
-        newPithos.authUser = authUser;
-        newPithos.authToken = authToken;
-        newPithos.publicURLPrefix = publicURLPrefix;
-        self.pithos = newPithos;
-        
-        pithosBrowserController.pithos = pithos;
-        self.pithosSyncDaemon = [[[PithosSyncDaemon alloc] initWithDirectoryPath:syncDirectoryPath 
-                                                                          pithos:pithos
-                                                                   containerName:syncContainerName 
-                                                                    timeInterval:syncTimeInterval 
-                                                                 resetLocalState:NO] autorelease];
-    } else if (![pithosSyncDaemon.directoryPath isEqualToString:syncDirectoryPath]) {
-        self.pithosSyncDaemon = [[[PithosSyncDaemon alloc] initWithDirectoryPath:syncDirectoryPath 
-                                                                          pithos:pithos
-                                                                   containerName:syncContainerName 
-                                                                    timeInterval:syncTimeInterval 
-                                                                 resetLocalState:YES] autorelease];
+#pragma mark -
+#pragma mark Menu Actions
+
+- (void)menuChangePithosAccount:(NSMenuItem *)sender {
+    PithosAccount *pithosAccount = (PithosAccount *)[sender representedObject];
+    if (!pithosAccount.active)
+        return;
+    if (![currentPithosAccount isEqualTo:pithosAccount] && [pithosAccounts containsObject:pithosAccount]) {
+        if ([self.pithosBrowserController operationsPending]) {
+            NSAlert *alert = [[[NSAlert alloc] init] autorelease];
+            [alert setMessageText:@"Pending Operations"];
+            [alert setInformativeText:@"There are pending operations in the browser, do you want to change accounts and cancel them?"];
+            [alert addButtonWithTitle:@"OK"];
+            [alert addButtonWithTitle:@"Cancel"];
+            NSInteger choice = [alert runModal];
+            if (choice == NSAlertSecondButtonReturn) 
+                return;
+        }
+        self.currentPithosAccount = pithosAccount;
+        [self showPithosBrowser:self];
+        pithosBrowserController.pithos = currentPithosAccount.pithos;
     }
 }
 
+- (void)menuChangeSyncActive:(NSMenuItem *)sender {
+    PithosAccount *pithosAccount = (PithosAccount *)[sender representedObject];
+    if (!pithosAccount.active)
+        return;
+    pithosAccount.syncActive = !pithosAccount.syncActive;
+    if (pithosPreferencesController && [pithosPreferencesController.selectedPithosAccount isEqualTo:pithosAccount])
+        pithosPreferencesController.syncActive = pithosAccount.syncActive;
+    [self savePithosAccounts:self];
+}
+
 @end
