Index: contrib/MacPorts_Framework/MPHelperTool.m
===================================================================
--- contrib/MacPorts_Framework/MPHelperTool.m	(revision 69795)
+++ contrib/MacPorts_Framework/MPHelperTool.m	(revision 72222)
@@ -60,4 +60,5 @@
 //fromt he request dictionary
 int notificationsFileDescriptor;
+static int hasInstalledSignalToSocket = 0;
 BOOL hasSetFileDescriptor = NO;
 NSString * ipcFilePath;
@@ -591,5 +592,5 @@
 	
     // Organise to have SIGINT delivered to a runloop callback.
-    if (err == 0) {
+    if (err == 0 && hasInstalledSignalToSocket == 0) {
         sigset_t    justSIGINT;
         
@@ -604,4 +605,6 @@
 									NULL
 									);
+									
+        hasInstalledSignalToSocket = 1;
 		//asl_NSLog(logClient , logMsg, ASL_LEVEL_DEBUG, @"MPHelperTool: IgnoreSigPipe Successful");
 		[ASLLogger logString:@"MPHelperTool: IgnoreSigPipe Successful"];
@@ -658,5 +661,5 @@
 	
     // Organise to have SIGINT delivered to a runloop callback.
-    if (err == 0) {
+    if (err == 0 && hasInstalledSignalToSocket == 0) {
         sigset_t    justSIGINT;
         
@@ -671,4 +674,7 @@
 									NULL
 									);
+		
+		hasInstalledSignalToSocket = 1;
+		
 		[ASLLogger logString:@"MPHelperTool: IgnoreSigPipe Successful"];
     }
Index: contrib/MacPorts_Framework/MPPort.h
===================================================================
--- contrib/MacPorts_Framework/MPPort.h	(revision 69795)
+++ contrib/MacPorts_Framework/MPPort.h	(revision 72222)
@@ -150,4 +150,14 @@
 
 /*!
+ @brief Computes the NSMutableArray object for key "defaults_variants" of the port
+ */
+- (void)checkDefaults;
+
+/*!
+ @brief Computes the conflicts of the port
+ */
+- (void)checkConflicts;
+
+/*!
  @brief Executes the specified target for this MPPort
  @param target NSString target to be executed for this MPPort
Index: contrib/MacPorts_Framework/MPPort.m
===================================================================
--- contrib/MacPorts_Framework/MPPort.m	(revision 69795)
+++ contrib/MacPorts_Framework/MPPort.m	(revision 72222)
@@ -91,4 +91,10 @@
 	// create sets of the depends_* tokenized properties that contain only the dependency name, not the dependency type
 	// make the descriptions readable
+	
+	if([string rangeOfString:@"default_variants"].location != NSNotFound)
+	{
+		NSLog(@"%@", string);
+	}
+
 	if ([self objectForKey:@"maintainers"] != nil) {
 		[self setObject:[self objectForKey:@"maintainers"] forKey:@"maintainersAsString"];		
@@ -118,4 +124,22 @@
 		[self addDependencyAsPortName:@"depends_run"];
 	}
+	if ([self objectForKey:@"depends_fetch"] != nil) {
+		[self setObject:[self objectForKey:@"depends_fetch"] forKey:@"depends_fetchAsString"];
+		[self setObject:[interpreter arrayFromTclListAsString:[self objectForKey:@"depends_fetch"]] forKey:@"depends_fetch"];
+		[self addDependencyAsPortName:@"depends_fetch"];
+	}	
+	if ([self objectForKey:@"depends_extract"] != nil) {
+		[self setObject:[self objectForKey:@"depends_extract"] forKey:@"depends_extractAsString"];
+		[self setObject:[interpreter arrayFromTclListAsString:[self objectForKey:@"depends_extract"]] forKey:@"depends_extract"];
+		[self addDependencyAsPortName:@"depends_extract"];
+	}	
+	
+	//Code for fetching default variants
+	if ([self objectForKey:@"default_variants"] != nil) {
+		//NSLog(@"Default Variants str: %@", string);
+		[self setObject:[self objectForKey:@"default_variants"] forKey:@"default_variantsAsString"];
+		[self setObject:[interpreter arrayFromTclListAsString:[self objectForKey:@"default_variants"]] forKey:@"default_variants"];
+	}
+	 
 	
 	@try {
@@ -248,18 +272,27 @@
 	   error:(NSError **)execError{
 	
-	NSString *opts; 
-	NSString *vrnts;
+	NSMutableString *opts; 
+	NSMutableString *vrnts;
 	MPInterpreter *interpreter;
-	opts = [NSString stringWithString:@" "];
-	vrnts = [NSString stringWithString:@" "];
+	opts = [NSMutableString stringWithCapacity:50];
+	[opts setString:@"{ "];
+	vrnts = [NSMutableString stringWithCapacity:50];
+	[vrnts setString:@"{ "];
 	interpreter = [MPInterpreter sharedInterpreter];
 	
+	
 	if (options != NULL) {
-		opts = [NSString stringWithString:[options componentsJoinedByString:@" "]];
-	}
+		[opts appendString: [NSString stringWithString:[options componentsJoinedByString:@" "]]];
+	}
+	
+	[opts appendString: @" }"];
+
 	if (variants != NULL) {
-		vrnts = [NSString stringWithString:[variants componentsJoinedByString:@" "]];
-	}
-	
+		[vrnts appendString: [NSString stringWithString:[variants componentsJoinedByString:@" "]]];
+	}
+	
+	[vrnts appendString: @" }"];
+	
+	//NSLog(@"Variants String: %@", vrnts);
 	//Send Global Notifications and update MPNotifications variable
 	[self sendGlobalExecNotification:target withStatus:@"Started"];
@@ -267,4 +300,9 @@
 	[[MPNotifications sharedListener] setPerformingTclCommand:target];
 	
+	/*
+	NSLog(@"Interpreter string:\n%@",[NSString stringWithFormat:
+									  @"set portHandle [mportopen  %@  %@  %@]; mportexec  $portHandle %@; mportclose $portHandle", 
+									  [self valueForKey:@"porturl"], opts, vrnts, target]);
+	*/
     [interpreter evaluateStringWithPossiblePrivileges:
         [NSString stringWithFormat:
@@ -350,4 +388,106 @@
 - (void)upgradeWithError:(NSError **)mError {
 	[self execPortProc:@"mportupgrade" withOptions:nil version:@"" error:mError];
+}
+
+//This function is called to initialize the array for the'default_variants' key for a port, which we can't do for all ports when loading
+- (void)checkDefaults
+{
+	//Check for default variants only if this is the first time we are checking
+	if ([self objectForKey:@"default_variants"] == nil)
+	{
+		//NSArray *defaultVariants = [port valueForKey:@"defaultVariants"];
+		NSMutableArray *defaultVariants= [NSMutableArray arrayWithCapacity:10];
+		char port_command[256];
+		
+		//Build the port variants command
+		strcpy(port_command, "port variants ");
+		strcat(port_command, [[self objectForKey:@"name"] cStringUsingEncoding: NSASCIIStringEncoding]);
+		strcat(port_command, " | grep \"\\[+]\" | sed 's/.*\\]//; s/:.*//' >> mpfw_default_variants");
+		
+		//Make the CLI call
+		system(port_command);
+		//Open the output file
+		FILE * file = fopen("mpfw_default_variants", "r");
+		
+		//Read all default_variants
+		char buffer[256];
+		while(!feof(file))
+		{
+			char * temp = fgets(buffer,256,file);
+			if(temp == NULL) continue;
+			buffer[strlen(buffer)-1]='\0';
+			//Add the variant in the Array
+			[defaultVariants addObject:[NSString stringWithCString:buffer]];
+		}
+		//Close and delete
+		fclose(file);
+		unlink("mpfw_default_variants");
+		
+		NSLog(@"Default variants count: %i", [defaultVariants count]);
+		//Code for fetching default variants
+		[self setObject:[NSString stringWithString:[defaultVariants componentsJoinedByString:@" "]]  forKey:@"default_variantsAsString"];
+		[self setObject:defaultVariants forKey:@"default_variants"];		
+	}
+
+}
+
+//This function is called to initiate the conflicts for a specific port, which we can't do for all ports when loading, much like
+//the default_variants
+- (void)checkConflicts;
+{
+	//Check for only if this is the first time we are checking
+	if ([self objectForKey:@"conflicts"] == nil)
+	{
+		
+		NSMutableArray *conflicts = [NSMutableArray arrayWithCapacity:20];
+		
+		char *script= " | python -c \"import re,sys;lines=sys.stdin.readlines();print '\\n'.join('%s,%s' % (re.sub(r'[\\W]','',lines[i-1].split()[0].rstrip(':')),','.join(l.strip().split()[3:])) for i, l in enumerate(lines) if l.strip().startswith('* conflicts'))\" >> /tmp/mpfw_conflict";
+		char command[512];
+		strcpy(command,"port variants ");
+		strcat(command, [[self name] UTF8String]);
+		strcat(command, script);
+		//printf("\n%s\n", command);
+		system(command);
+		
+		//Open the output file
+		FILE * file = fopen("/tmp/mpfw_conflict", "r");
+		
+		//Read all conflicts
+		char buffer[256];
+		while(!feof(file))
+		{
+			char * temp = fgets(buffer,256,file);
+			if(temp == NULL) continue;
+			buffer[strlen(buffer)-1]='\0';
+			//Add the variant in the Array
+			//printf("buffer:\n%s\n",buffer);
+			
+			char *token;
+			char *search = ",";
+			
+			token = strtok(buffer, search);
+			//printf("token: %s\n",token);
+			if(token == NULL) break;
+			
+			NSString *variant = [NSString stringWithCString:token];
+			NSMutableArray *conflictsWith=[NSMutableArray arrayWithCapacity:10];
+			NSLog(@"%@", variant);
+			while ((token = strtok(NULL, search)) != NULL)
+			{
+				NSLog(@"token: %@",[NSString stringWithCString:token]);
+				[conflictsWith addObject:[NSString stringWithCString:token]];
+				//NSLog(@"count %i",[[checkboxes[i] conflictsWith] count]);
+			}
+			
+			NSDictionary *variantConflictsWith = [NSDictionary dictionaryWithObject:conflictsWith forKey:variant];
+			[conflicts addObject:variantConflictsWith];
+			//[defaultVariants addObject:[NSString stringWithCString:buffer]];
+		}
+		//Close and delete
+		fclose(file);
+		unlink("/tmp/mpfw_conflict");		
+
+		[self setObject:conflicts forKey:@"conflicts"];
+	}		
 }
 
Index: contrib/MacPorts_Framework/MPPortProcess.m
===================================================================
--- contrib/MacPorts_Framework/MPPortProcess.m	(revision 69795)
+++ contrib/MacPorts_Framework/MPPortProcess.m	(revision 72222)
@@ -82,5 +82,4 @@
     portProcessConnection = [NSConnection defaultConnection];
     NSString *PKGPath = [[NSString alloc] initWithCString:argv[1] encoding:NSUTF8StringEncoding];
-//    NSString *portProcessInitPath = [[NSString alloc] initWithCString:argv[2] encoding:NSUTF8StringEncoding];
     
     MPPortProcess *portProcess = [[MPPortProcess alloc] initWithPKGPath:PKGPath];
Index: contrib/MacPorts_Framework/MacPorts.Framework.xcodeproj/project.pbxproj
===================================================================
--- contrib/MacPorts_Framework/MacPorts.Framework.xcodeproj/project.pbxproj	(revision 69795)
+++ contrib/MacPorts_Framework/MacPorts.Framework.xcodeproj/project.pbxproj	(revision 72222)
@@ -706,5 +706,12 @@
 			buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "MacPorts.Framework" */;
 			compatibilityVersion = "Xcode 2.4";
+			developmentRegion = English;
 			hasScannedForEncodings = 1;
+			knownRegions = (
+				English,
+				Japanese,
+				French,
+				German,
+			);
 			mainGroup = 0867D691FE84028FC02AAC07 /* MacPorts Foundation */;
 			productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
Index: contrib/MacPorts_Framework/init.tcl
===================================================================
--- contrib/MacPorts_Framework/init.tcl	(revision 69795)
+++ contrib/MacPorts_Framework/init.tcl	(revision 72222)
@@ -2,80 +2,5 @@
 package require notifications
 
-
-#Set ui_options to log all messages to stdout and notify system
-#filtering is done on the Obj-C side of things
-# set ui_options(ports_debug) "yes"
-set ui_options(ports_verbose) "yes"
-
-# ui_options accessor
-proc ui_isset {val} {
-	global ui_options
-	if {[info exists ui_options($val)]} {
-		if {$ui_options($val) == "yes"} {
-			return 1
-		}
-	}
-	return 0
-}
-
-# UI Callback
-proc ui_prefix {priority} {
-    switch $priority {
-        debug {
-        	return "DEBUG: "
-        }
-        error {
-        	return "Error: "
-        }
-        warn {
-        	return "Warning: "
-        }
-        default {
-        	return ""
-        }
-    }
-}
-
-proc ui_channels {priority} {
-    global logfd
-    switch $priority {
-        debug {
-            if {[ui_isset ports_debug]} {
-            	return {stderr}
-            } else {
-            	return {}
-            }
-        }
-        info {
-            if {[ui_isset ports_verbose]} {
-                return {stdout}
-            } else {
-                return {}
-            }
-        }
-        msg {
-            if {[ui_isset ports_quiet]} {
-              return {}
-            } else {
-              return {stdout}
-            }
-        }
-        error {
-        	return {stderr}
-        }
-        default {
-        	return {stdout}
-        }
-    }
-}
-
-
-
-
-#Modifying UI initialization to enable notifications
-#Redefine ui_$pritority to throw global notifications
-#This is currently under works ... a reasonable solution
-#should be coming up soon
-proc macports::ui_init {priority args} {
+proc ui_init {priority prefix channels message} {
     switch $priority {
   		msg {
@@ -84,5 +9,5 @@
   		debug {
   			set nottype "MPDebugNotification"
-  			puts "Recieved Debug"
+  			puts "Recieved Debug init"
   		}
   		warn {
@@ -101,58 +26,11 @@
   		}	
   	}
-  
-    # Get the list of channels.
-    if {[llength [info commands ui_channels]] > 0} {
-        set channels [ui_channels $priority]
-    } else {
-        set channels [ui_channels_default $priority]
-    }
 
-    # Simplify ui_$priority.
-    set nbchans [llength $channels]
-    if {$nbchans == 0} {
-        proc ::ui_$priority {args} [subst {
-          notifications send $nottype "$chan $prefix" "\$str"
-        }]
-    } else {
-        if {[llength [info commands ui_prefix]] > 0} {
-            set prefix [ui_prefix $priority]
-        } else {
-            set prefix [ui_prefix_default $priority]
-        }
+    proc ::ui_$priority {message} [subst {
+        notifications send $nottype "$channels($priority) $prefix" "\$message"
+        ui_message $priority $prefix "" "\$message"
+    }]
+}
 
-        if {[llength [info commands ::ui_init]] > 0} {
-            eval ::ui_init $priority $prefix $channels $args
-        } else {
-            if {$nbchans == 1} {
-                set chan [lindex $channels 0]
-                proc ::ui_$priority {args} [subst {
-                  if {\[lindex \$args 0\] == "-nonewline"} {
-                    puts $chan "$prefix\[lindex \$args 1\]"
-                    notifications send $nottype "$chan $prefix" "\[lindex \$args 1\]"
-                  } else {
-                    puts -nonewline $chan "$prefix\[lindex \$args 1\]"
-                    notifications send $nottype "$chan $prefix" "\[lindex \$args 0\]"
-                  }
-                }]
-            } else {
-                proc ::ui_$priority {args} [subst {
-                    foreach chan \$channels {
-                      if {\[lindex \$args 0\] == "-nonewline"} {
-                        puts $chan "$prefix\[lindex \$args 1\]"
-                        notifications send $nottype "$chan $prefix" "\[lindex \$args 1\]"
-                      } else {
-                        puts -nonewline $chan "$prefix\[lindex \$args 1\]"
-                        notifications send $nottype "$chan $prefix" "\[lindex \$args 0\]"
-                      }
-                    }
-                }]
-            }
-        }
-
-        # Call ui_$priority
-        eval ::ui_$priority $args
-    }
-}
 
 
@@ -161,5 +39,5 @@
 #in macports.tcl.
 proc mportuninstall {portname {v ""} {optionslist ""}} {
-	if {[catch {portuninstall::uninstall $portname $v $optionslist} result]} {
+	if {[catch {registry_uninstall::uninstall $portname $v $optionslist} result]} {
 		
 			global errorInfo
Index: contrib/MacPorts_Framework/interpInit.tcl
===================================================================
--- contrib/MacPorts_Framework/interpInit.tcl	(revision 69795)
+++ contrib/MacPorts_Framework/interpInit.tcl	(revision 72222)
@@ -3,158 +3,33 @@
 
 
+proc ui_init {priority prefix channels message} {
+    switch $priority {
+  		msg {
+  			set nottype "MPMsgNotification" 
+  		}
+  		debug {
+  			set nottype "MPDebugNotification"
+  			puts "Recieved Debug init"
+  		}
+  		warn {
+  			set nottype "MPWarnNotification"
+  		}
+  		error {
+  			set nottype "MPErrorNotification"
+  			puts "Recieved Error"
+  		}
+  		info {
+  			set nottype "MPInfoNotification"
+  			puts "Recieved Info"
+  		}
+  		default {
+  			set nottype "MPDefaultNotification"
+  		}	
+  	}
 
-#Set ui_options to log all messages to stdout and notify system
-#filtering is done on the Obj-C side of things
-set ui_options(ports_debug) "yes"
-set ui_options(ports_verbose) "yes"
-
-# ui_options accessor
-proc ui_isset {val} {
-	global ui_options
-	if {[info exists ui_options($val)]} {
-		if {$ui_options($val) == "yes"} {
-			return 1
-		}
-	}
-	return 0
-}
-
-# UI Callback
-proc ui_prefix {priority} {
-    switch $priority {
-        debug {
-        	return "DEBUG: "
-        }
-        error {
-        	return "Error: "
-        }
-        warn {
-        	return "Warning: "
-        }
-        default {
-        	return ""
-        }
-    }
-}
-
-proc ui_channels {priority} {
-    global logfd
-    switch $priority {
-        debug {
-            if {[ui_isset ports_debug]} {
-            	return {stderr}
-            } else {
-            	return {}
-            }
-        }
-        info {
-            if {[ui_isset ports_verbose]} {
-                return {stdout}
-            } else {
-                return {}
-            }
-        }
-        msg {
-            if {[ui_isset ports_quiet]} {
-              return {}
-            } else {
-              return {stdout}
-            }
-        }
-        error {
-        	return {stderr}
-        }
-        default {
-        	return {stdout}
-        }
-    }
-}
-
-
-
-#Modifying UI initialization to enable notifications
-#Redefine ui_$pritority to throw global notifications
-#This is currently under works ... a reasonable solution
-#should be coming up soon
-proc macports::ui_init {priority args} {
-    switch $priority {
-      msg {
-        set nottype "MPMsgNotification" 
-      }
-      debug {
-        set nottype "MPDebugNotification"
-        puts "Recieved Debug"
-      }
-      warn {
-        set nottype "MPWarnNotification"
-      }
-      error {
-        set nottype "MPErrorNotification"
-        puts "Recieved Error"
-      }
-      info {
-        set nottype "MPInfoNotification"
-        puts "Recieved Info"
-      }
-      default {
-        set nottype "MPDefaultNotification"
-      }
-    }
-
-    # Get the list of channels.
-    if {[llength [info commands ui_channels]] > 0} {
-        set channels [ui_channels $priority]
-    } else {
-        set channels [ui_channels_default $priority]
-    }
-    
-    #set channels [ui_channels $priority]
-    
-    # Simplify ui_$priority.
-    set nbchans [llength $channels]
-    if {$nbchans == 0} {
-        proc ::ui_$priority {str} [subst {
-          simplelog "$nottype $chan $prefix" "\$str" 
-        }]
-    } else {
-      if {[llength [info commands ui_prefix]] > 0} {
-          set prefix [ui_prefix $priority]
-      } else {
-          set prefix [ui_prefix_default $priority]
-      }
-
-      if {[llength [info commands ::ui_init]] > 0} {
-          eval ::ui_init $priority $prefix $channels $args
-      } else {
-        if {$nbchans == 1} {
-          set chan [lindex $channels 0]
-
-          proc ::ui_$priority {args} [subst {
-            if {\[lindex \$args 0\] == "-nonewline"} {
-              puts $chan "$prefix\[lindex \$args 1\]"
-              simplelog "$nottype $chan $prefix" "\[lindex \$args 1\]"
-            } else {
-              puts -nonewline $chan "$prefix\[lindex \$args 1\]"
-              simplelog "$nottype $chan $prefix" "\[lindex \$args 0\]"
-            }
-          }]
-        } else {
-          proc ::ui_$priority {args} [subst {
-            foreach chan \$channels {
-              if {\[lindex \$args 0\] == "-nonewline"} {
-                puts $chan "$prefix\[lindex \$args 1\]"
-                simplelog "$nottype $chan $prefix" "\[lindex \$args 1\]"
-              } else {
-                puts -nonewline $chan "$prefix\[lindex \$args 1\]"
-                simplelog "$nottype $chan $prefix" "\[lindex \$args 0\]"
-              }
-            }
-          }]
-        }
-      }
-
-      # Call ui_$priority
-      eval ::ui_$priority $args
-    }
+    proc ::ui_$priority {message} [subst {
+        simplelog "$nottype $channels($priority) $prefix" "\$message"
+        ui_message $priority $prefix "" "\$message"
+    }]
 }
 
@@ -165,5 +40,5 @@
 set mp_empty_list [list]
 proc mportuninstall {portname {v ""} {optionslist ""} } {
-	if {[catch {portuninstall::uninstall $portname $v [array get options]} result]} {
+	if {[catch {registry_uninstall::uninstall $portname $v [array get options]} result]} {
 		
 			global errorInfo
Index: contrib/MacPorts_Framework/portProcessInit.tcl
===================================================================
--- contrib/MacPorts_Framework/portProcessInit.tcl	(revision 69795)
+++ contrib/MacPorts_Framework/portProcessInit.tcl	(revision 72222)
@@ -3,79 +3,5 @@
 
 
-
-#Set ui_options to log all messages to stdout and notify system
-#filtering is done on the Obj-C side of things
-set ui_options(ports_debug) "yes"
-set ui_options(ports_verbose) "yes"
-
-# ui_options accessor
-proc ui_isset {val} {
-	global ui_options
-	if {[info exists ui_options($val)]} {
-		if {$ui_options($val) == "yes"} {
-			return 1
-		}
-	}
-	return 0
-}
-
-# UI Callback
-proc ui_prefix {priority} {
-    switch $priority {
-        debug {
-        	return "DEBUG: "
-        }
-        error {
-        	return "Error: "
-        }
-        warn {
-        	return "Warning: "
-        }
-        default {
-        	return ""
-        }
-    }
-}
-
-proc ui_channels {priority} {
-    global logfd
-    switch $priority {
-        debug {
-            if {[ui_isset ports_debug]} {
-            	return {stderr}
-            } else {
-            	return {}
-            }
-        }
-        info {
-            if {[ui_isset ports_verbose]} {
-                return {stdout}
-            } else {
-                return {}
-			}
-		}
-        msg {
-            if {[ui_isset ports_quiet]} {
-                return {}
-			} else {
-				return {stdout}
-			}
-		}
-        error {
-        	return {stderr}
-        }
-        default {
-        	return {stdout}
-        }
-    }
-}
-
-
-
-#Modifying UI initialization to enable notifications
-#Redefine ui_$pritority to throw global notifications
-#This is currently under works ... a reasonable solution
-#should be coming up soon
-proc macports::ui_init {priority args} {
+proc ui_init {priority prefix channels message} {
     switch $priority {
   		msg {
@@ -84,5 +10,5 @@
   		debug {
   			set nottype "MPDebugNotification"
-  			puts "Recieved Debug"
+  			puts "Recieved Debug init"
   		}
   		warn {
@@ -101,57 +27,9 @@
   		}	
   	}
-  
-    # Get the list of channels.
-    if {[llength [info commands ui_channels]] > 0} {
-        set channels [ui_channels $priority]
-    } else {
-        set channels [ui_channels_default $priority]
-    }
 
-    # Simplify ui_$priority.
-    set nbchans [llength $channels]
-    if {$nbchans == 0} {
-        proc ::ui_$priority {args} [subst {
-          simplelog "$nottype $chan $prefix" "\$str"
-        }]
-    } else {
-        if {[llength [info commands ui_prefix]] > 0} {
-            set prefix [ui_prefix $priority]
-        } else {
-            set prefix [ui_prefix_default $priority]
-        }
-
-        if {[llength [info commands ::ui_init]] > 0} {
-            eval ::ui_init $priority $prefix $channels $args
-        } else {
-            if {$nbchans == 1} {
-                set chan [lindex $channels 0]
-                proc ::ui_$priority {args} [subst {
-                  if {\[lindex \$args 0\] == "-nonewline"} {
-                    puts $chan "$prefix\[lindex \$args 1\]"
-                    simplelog "$nottype $chan $prefix" "\[lindex \$args 1\]"
-                  } else {
-                    puts -nonewline $chan "$prefix\[lindex \$args 1\]"
-                    simplelog "$nottype $chan $prefix" "\[lindex \$args 0\]"
-                  }
-                }]
-            } else {
-                proc ::ui_$priority {args} [subst {
-                    foreach chan \$channels {
-                      if {\[lindex \$args 0\] == "-nonewline"} {
-                        puts $chan "$prefix\[lindex \$args 1\]"
-                        simplelog "$nottype $chan $prefix" "\[lindex \$args 1\]"
-                      } else {
-                        puts -nonewline $chan "$prefix\[lindex \$args 1\]"
-                        simplelog "$nottype $chan $prefix" "\[lindex \$args 0\]"
-                      }
-                    }
-                }]
-            }
-        }
-
-        # Call ui_$priority
-        eval ::ui_$priority $args
-    }
+    proc ::ui_$priority {message} [subst {
+        simplelog "$nottype $channels($priority) $prefix" "\$message"
+        ui_message $priority $prefix "" "\$message"
+    }]
 }
 
@@ -162,5 +40,5 @@
 set mp_empty_list [list]
 proc mportuninstall {portname {v ""} {optionslist ""} } {
-	if {[catch {portuninstall::uninstall $portname $v [array get options]} result]} {
+	if {[catch {registry_uninstall::uninstall $portname $v [array get options]} result]} {
 		
 			global errorInfo
