Merge LibBlacktortoise codes.