diff --git a/indra/integration_tests/llui_libtest/llui_libtest.cpp b/indra/integration_tests/llui_libtest/llui_libtest.cpp
index abd8f7dbdeca0280ab9cda395dc464a04b34b613..8383066e46721c3065d86d290e67b8bd15725df8 100644
--- a/indra/integration_tests/llui_libtest/llui_libtest.cpp
+++ b/indra/integration_tests/llui_libtest/llui_libtest.cpp
@@ -191,10 +191,9 @@ void export_test_floaters()
 		// Build a floater and output new attributes
 		LLXMLNodePtr output_node = new LLXMLNode();
 		LLFloater* floater = new LLFloater(LLSD());
-		LLUICtrlFactory::getInstance()->buildFloater(floater,
-													 filename,
-												//	 FALSE,	// don't open floater
-													 output_node);
+		floater->buildFromFile(	filename,
+								//	 FALSE,	// don't open floater
+								output_node);
 		std::string out_filename = xui_dir + filename;
 		std::string::size_type extension_pos = out_filename.rfind(".xml");
 		out_filename.resize(extension_pos);
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp
index 9337626c8e90d5181ae0b0a64a46e6a496bb04d7..5ce52185e3f1e5d59dd3c80b5382a6de0548944f 100644
--- a/indra/llui/llaccordionctrl.cpp
+++ b/indra/llui/llaccordionctrl.cpp
@@ -89,7 +89,7 @@ LLAccordionCtrl::LLAccordionCtrl() : LLPanel()
 
 	mSingleExpansion = false;
 	mFitParent = false;
-	buildPanel(this, "accordion_parent.xml");	
+	buildFromFile( "accordion_parent.xml");	
 }
 
 //---------------------------------------------------------------------------------
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index d66b3c1707ebdac4f4e14795f74761b4c44ea13c..0cd692b4a42400ab14d2cfe3952954634c46beba 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -2887,8 +2887,7 @@ bool LLFloater::isVisible(const LLFloater* floater)
 
 static LLFastTimer::DeclareTimer FTM_BUILD_FLOATERS("Build Floaters");
 
-/* static */
-bool LLFloater::buildFloater(LLFloater* floaterp, const std::string& filename, LLXMLNodePtr output_node)
+bool LLFloater::buildFromFile(const std::string& filename, LLXMLNodePtr output_node)
 {
 	LLFastTimer timer(FTM_BUILD_FLOATERS);
 	LLXMLNodePtr root;
@@ -2921,23 +2920,23 @@ bool LLFloater::buildFloater(LLFloater* floaterp, const std::string& filename, L
 	lldebugs << "Building floater " << filename << llendl;
 	LLUICtrlFactory::instance().pushFileName(filename);
 	{
-		if (!floaterp->getFactoryMap().empty())
+		if (!getFactoryMap().empty())
 		{
-			LLPanel::sFactoryStack.push_front(&floaterp->getFactoryMap());
+			LLPanel::sFactoryStack.push_front(&getFactoryMap());
 		}
 
 		 // for local registry callbacks; define in constructor, referenced in XUI or postBuild
-		floaterp->getCommitCallbackRegistrar().pushScope();
-		floaterp->getEnableCallbackRegistrar().pushScope();
+		getCommitCallbackRegistrar().pushScope();
+		getEnableCallbackRegistrar().pushScope();
 		
-		res = floaterp->initFloaterXML(root, floaterp->getParent(), filename, output_node);
+		res = initFloaterXML(root, getParent(), filename, output_node);
 
-		floaterp->setXMLFilename(filename);
+		setXMLFilename(filename);
 		
-		floaterp->getCommitCallbackRegistrar().popScope();
-		floaterp->getEnableCallbackRegistrar().popScope();
+		getCommitCallbackRegistrar().popScope();
+		getEnableCallbackRegistrar().popScope();
 		
-		if (!floaterp->getFactoryMap().empty())
+		if (!getFactoryMap().empty())
 		{
 			LLPanel::sFactoryStack.pop_front();
 		}
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 69762c77231d10be480f47631973ba8732e61707..750cf23c7d8d259893807af74b89f76178d7a116 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -147,7 +147,7 @@ friend class LLMultiFloater;
 
 	// Don't export top/left for rect, only height/width
 	static void setupParamsForExport(Params& p, LLView* parent);
-	static bool buildFloater(LLFloater* floaterp, const std::string &filename, LLXMLNodePtr output_node);
+	bool buildFromFile(const std::string &filename, LLXMLNodePtr output_node = NULL);
 
 	void initFromParams(const LLFloater::Params& p);
 	bool initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::string& filename, LLXMLNodePtr output_node = NULL);
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp
index 2c318540112c2296fb587c509cbaa8e406c0ba80..39a67ee57b31bd7c1393dd1c8fcc8d639b731345 100644
--- a/indra/llui/llfloaterreg.cpp
+++ b/indra/llui/llfloaterreg.cpp
@@ -127,7 +127,7 @@ LLFloater* LLFloaterReg::getInstance(const std::string& name, const LLSD& key)
 
 				res = build_func(key);
 				
-				bool success = LLFloater::buildFloater(res, xui_file, NULL);
+				bool success = res->buildFromFile(xui_file, NULL);
 				if (!success)
 				{
 					llwarns << "Failed to build floater type: '" << name << "'." << llendl;
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index f79429e0f6164b719165d8e4c8357d21ca4f670f..51c8f6c743c00e96dcac13672dcc2f7d6d9ab04d 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -972,7 +972,7 @@ static LLFastTimer::DeclareTimer FTM_BUILD_PANELS("Build Panels");
 //-----------------------------------------------------------------------------
 // buildPanel()
 //-----------------------------------------------------------------------------
-BOOL LLPanel::buildPanel(LLPanel* panelp, const std::string& filename, LLXMLNodePtr output_node, const LLPanel::Params& default_params)
+BOOL LLPanel::buildFromFile(const std::string& filename, LLXMLNodePtr output_node, const LLPanel::Params& default_params)
 {
 	LLFastTimer timer(FTM_BUILD_PANELS);
 	BOOL didPost = FALSE;
@@ -1005,23 +1005,23 @@ BOOL LLPanel::buildPanel(LLPanel* panelp, const std::string& filename, LLXMLNode
 
 	LLUICtrlFactory::instance().pushFileName(filename);
 	{
-		if (!panelp->getFactoryMap().empty())
+		if (!getFactoryMap().empty())
 		{
-			sFactoryStack.push_back(&panelp->getFactoryMap());
+			sFactoryStack.push_back(&getFactoryMap());
 		}
 		
 		 // for local registry callbacks; define in constructor, referenced in XUI or postBuild
-		panelp->getCommitCallbackRegistrar().pushScope();
-		panelp->getEnableCallbackRegistrar().pushScope();
+		getCommitCallbackRegistrar().pushScope();
+		getEnableCallbackRegistrar().pushScope();
 		
-		didPost = panelp->initPanelXML(root, NULL, output_node, default_params);
+		didPost = initPanelXML(root, NULL, output_node, default_params);
 
-		panelp->getCommitCallbackRegistrar().popScope();
-		panelp->getEnableCallbackRegistrar().popScope();
+		getCommitCallbackRegistrar().popScope();
+		getEnableCallbackRegistrar().popScope();
 		
-		panelp->setXMLFilename(filename);
+		setXMLFilename(filename);
 
-		if (!panelp->getFactoryMap().empty())
+		if (!getFactoryMap().empty())
 		{
 			sFactoryStack.pop_back();
 		}
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index de16d28e270d150d73dea408d4945fb0dd26082f..cacd1fdcf04bb08c0ddc3352ef1f0e47cf727f7a 100644
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -110,7 +110,7 @@ class LLPanel : public LLUICtrl
 	LLPanel(const LLPanel::Params& params = getDefaultParams());
 	
 public:
-	static 	BOOL buildPanel(LLPanel* panelp, const std::string &filename, LLXMLNodePtr output_node = NULL, const LLPanel::Params&default_params = getDefaultParams());
+	BOOL buildFromFile(const std::string &filename, LLXMLNodePtr output_node = NULL, const LLPanel::Params&default_params = getDefaultParams());
 
 	static LLPanel* createFactoryPanel(const std::string& name);
 
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index 16fb618c8834bbebb7f4d007dec9154b8606ce41..82076335d732d91d887cbc45663f2c2b1a6b6ccf 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -155,38 +155,12 @@ class LLUICtrlFactory : public LLSingleton<LLUICtrlFactory>
 	void pushFileName(const std::string& name);
 	void popFileName();
 
-	template<typename T>
-	static T* createWidget(const typename T::Params& params, LLView* parent = NULL)
-	{
-		T* widget = NULL;
-
-		if (!params.validateBlock())
-		{
-			llwarns << getInstance()->getCurFileName() << ": Invalid parameter block for " << typeid(T).name() << llendl;
-			//return NULL;
-		}
-
-		{ LLFastTimer _(FTM_WIDGET_CONSTRUCTION);
-			widget = new T(params);	
-		}
-		{ LLFastTimer _(FTM_INIT_FROM_PARAMS);
-			widget->initFromParams(params);
-		}
-
-		if (parent)
-		{
-			S32 tab_group = params.tab_group.isProvided() ? params.tab_group() : S32_MAX;
-			setCtrlParent(widget, parent, tab_group);
-		}
-		return widget;
-	}
-
 	template<typename T>
 	static T* create(typename T::Params& params, LLView* parent = NULL)
 	{
 		params.fillFrom(ParamDefaults<typename T::Params, 0>::instance().get());
 
-		T* widget = createWidget<T>(params, parent);
+		T* widget = createWidgetImpl<T>(params, parent);
 		if (widget)
 		{
 			widget->postBuild();
@@ -249,8 +223,47 @@ class LLUICtrlFactory : public LLSingleton<LLUICtrlFactory>
 		return create<T>(widget_params);
 	}
 
+	static void createChildren(LLView* viewp, LLXMLNodePtr node, const widget_registry_t&, LLXMLNodePtr output_node = NULL);
+
+	static bool getLayeredXMLNode(const std::string &filename, LLXMLNodePtr& root);
+	static bool getLocalizedXMLNode(const std::string &xui_filename, LLXMLNodePtr& root);
+
+private:
+	template <typename T> friend class LLChildRegistry;
+
 	static void copyName(LLXMLNodePtr src, LLXMLNodePtr dest);
 
+	// helper function for adding widget type info to various registries
+	static void registerWidget(const std::type_info* widget_type, const std::type_info* param_block_type, const std::string& tag);
+
+	static void loadWidgetTemplate(const std::string& widget_tag, LLInitParam::BaseBlock& block);
+
+	template<typename T>
+	static T* createWidgetImpl(const typename T::Params& params, LLView* parent = NULL)
+	{
+		T* widget = NULL;
+
+		if (!params.validateBlock())
+		{
+			llwarns << getInstance()->getCurFileName() << ": Invalid parameter block for " << typeid(T).name() << llendl;
+			//return NULL;
+		}
+
+		{ LLFastTimer _(FTM_WIDGET_CONSTRUCTION);
+			widget = new T(params);	
+		}
+		{ LLFastTimer _(FTM_INIT_FROM_PARAMS);
+			widget->initFromParams(params);
+		}
+
+		if (parent)
+		{
+			S32 tab_group = params.tab_group.isProvided() ? params.tab_group() : S32_MAX;
+			setCtrlParent(widget, parent, tab_group);
+		}
+		return widget;
+	}
+
 	template<typename T>
 	static T* defaultBuilder(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node)
 	{
@@ -275,7 +288,7 @@ class LLUICtrlFactory : public LLSingleton<LLUICtrlFactory>
 		// Apply layout transformations, usually munging rect
 		params.from_xui = true;
 		T::applyXUILayout(params, parent);
-		T* widget = createWidget<T>(params, parent);
+		T* widget = createWidgetImpl<T>(params, parent);
 
 		typedef typename T::child_registry_t registry_t;
 
@@ -290,18 +303,7 @@ class LLUICtrlFactory : public LLSingleton<LLUICtrlFactory>
 		return widget;
 	}
 
-	static void createChildren(LLView* viewp, LLXMLNodePtr node, const widget_registry_t&, LLXMLNodePtr output_node = NULL);
-
-	static bool getLayeredXMLNode(const std::string &filename, LLXMLNodePtr& root);
-	
-	static bool getLocalizedXMLNode(const std::string &xui_filename, LLXMLNodePtr& root);
-
-	static void loadWidgetTemplate(const std::string& widget_tag, LLInitParam::BaseBlock& block);
 
-	// helper function for adding widget type info to various registries
-	static void registerWidget(const std::type_info* widget_type, const std::type_info* param_block_type, const std::string& tag);
-
-private:
 	static const std::string* getWidgetTag(const std::type_info* widget_type);
 
 	// this exists to get around dependency on llview
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index f448816f76cf75aa232417ebb1f6163605f598af..95ced5067d183070621b1e52de6a58c2e2de8765 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -498,7 +498,7 @@ LLAvalineListItem::LLAvalineListItem(bool hide_number/* = true*/) : LLAvatarList
 , mIsHideNumber(hide_number)
 {
 	// should not use buildPanel from the base class to ensure LLAvalineListItem::postBuild is called.
-	buildPanel(this, "panel_avatar_list_item.xml");
+	buildFromFile( "panel_avatar_list_item.xml");
 }
 
 BOOL LLAvalineListItem::postBuild()
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp
index 18a5d74527f1fad8455d64adc890dd3ce497e939..81c9b64c12ebfccbbc8d24aae74f7288a9b9ce86 100644
--- a/indra/newview/llavatarlistitem.cpp
+++ b/indra/newview/llavatarlistitem.cpp
@@ -75,7 +75,7 @@ LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/)
 {
 	if (not_from_ui_factory)
 	{
-		buildPanel(this, "panel_avatar_list_item.xml");
+		buildFromFile("panel_avatar_list_item.xml");
 	}
 	// *NOTE: mantipov: do not use any member here. They can be uninitialized here in case instance
 	// is created from the UICtrlFactory
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 310b406bfd3b39bc74bb362e0a183ba39b03f53c..c4eda5f1073c8c1eafa23a7749dd7608a9ead6dc 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -112,7 +112,7 @@ class LLBottomTrayLite
 		  mGesturePanel(NULL)
 	{
 		mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL);
-		buildPanel(this, "panel_bottomtray_lite.xml");
+		buildFromFile("panel_bottomtray_lite.xml");
 		// Necessary for focus movement among child controls
 		setFocusRoot(TRUE);
 	}
@@ -163,7 +163,7 @@ LLBottomTray::LLBottomTray(const LLSD&)
 
 	mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL);
 
-	buildPanel(this,"panel_bottomtray.xml");
+	buildFromFile("panel_bottomtray.xml");
 
 	LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraItem, _2));
 
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index b6788b7739c5f23d4dedc75119b33124b8f24582..e1e425fa8cc2d8af88e8130c8811dd02a566a9e9 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -107,7 +107,7 @@ class LLChatHistoryHeader: public LLPanel
 	static LLChatHistoryHeader* createInstance(const std::string& file_name)
 	{
 		LLChatHistoryHeader* pInstance = new LLChatHistoryHeader;
-		buildPanel(pInstance, file_name);	
+		pInstance->buildFromFile(file_name);	
 		return pInstance;
 	}
 
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index ed4803f87a78f3d53874824e3b59af833b176c7b..b1c878ed769779941d3ea318322a925450bb819a 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -57,7 +57,7 @@ static const S32 msg_height_pad = 5;
 LLNearbyChatToastPanel* LLNearbyChatToastPanel::createInstance()
 {
 	LLNearbyChatToastPanel* item = new LLNearbyChatToastPanel();
-	buildPanel(item, "panel_chat_item.xml");
+	item->buildFromFile("panel_chat_item.xml");
 	item->setFollows(FOLLOWS_NONE);
 	return item;
 }
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 6b7a257a4b37a4ade2835a6815c76f10f85d9f42..b8776d0af2afb55aa1fcb184e2277587db6fdfaa 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -667,16 +667,22 @@ void LLFavoritesBarCtrl::draw()
 	}
 }
 
-LLXMLNodePtr LLFavoritesBarCtrl::getButtonXMLNode()
+const LLButton::Params& LLFavoritesBarCtrl::getButtonParams()
 {
-	LLXMLNodePtr buttonXMLNode = NULL;
-	bool success = LLUICtrlFactory::getLayeredXMLNode("favorites_bar_button.xml", buttonXMLNode);
-	if (!success)
+	static LLButton::Params button_params;
+	static bool params_initialized = false;
+
+	if (!params_initialized)
 	{
-		llwarns << "Failed to create Favorites Bar button from favorites_bar_button.xml" << llendl;
-		buttonXMLNode = NULL;
+		LLXMLNodePtr button_xml_node;
+		if(LLUICtrlFactory::getLayeredXMLNode("favorites_bar_button.xml", button_xml_node))
+		{
+			LLXUIParser::instance().readXUI(button_xml_node, button_params, "favorites_bar_button.xml");
+		}
+		params_initialized = true;
 	}
-	return buttonXMLNode;
+
+	return button_params;
 }
 
 void LLFavoritesBarCtrl::updateButtons()
@@ -688,11 +694,8 @@ void LLFavoritesBarCtrl::updateButtons()
 		return;
 	}
 
-	static LLXMLNodePtr buttonXMLNode = getButtonXMLNode();
-	if (buttonXMLNode.isNull())
-	{
-		return;
-	}
+	const LLButton::Params& button_params = getButtonParams();
+
 	if(mItems.empty())
 	{
 		mBarLabel->setVisible(TRUE);
@@ -768,7 +771,7 @@ void LLFavoritesBarCtrl::updateButtons()
 		int j = first_changed_item_index;
 		for (; j < mItems.count(); j++)
 		{
-			last_new_button = createButton(mItems[j], buttonXMLNode, last_right_edge);
+			last_new_button = createButton(mItems[j], button_params, last_right_edge);
 			if (!last_new_button)
 			{
 				break;
@@ -786,8 +789,7 @@ void LLFavoritesBarCtrl::updateButtons()
 			//or there are some new favorites, or width had been changed
 			// so if we need to display chevron button,  we must update dropdown items too. 
 			mUpdateDropDownItems = true;
-			S32 buttonHGap = 2; // default value
-			buttonXMLNode->getAttributeS32("left", buttonHGap);
+			S32 buttonHGap = button_params.rect.left; // default value
 			LLRect rect;
 			// Chevron button should stay right aligned
 			rect.setOriginAndSize(getRect().mRight - mChevronButton->getRect().getWidth() - buttonHGap, 0,
@@ -814,12 +816,10 @@ void LLFavoritesBarCtrl::updateButtons()
 	}
 }
 
-LLButton* LLFavoritesBarCtrl::createButton(const LLPointer<LLViewerInventoryItem> item, LLXMLNodePtr &buttonXMLNode, S32 x_offset)
+LLButton* LLFavoritesBarCtrl::createButton(const LLPointer<LLViewerInventoryItem> item, const LLButton::Params& button_params, S32 x_offset)
 {
-	S32 def_button_width = 120;
-	buttonXMLNode->getAttributeS32("width", def_button_width);
-	S32 button_x_delta = 2; // default value
-	buttonXMLNode->getAttributeS32("left", button_x_delta);
+	S32 def_button_width = button_params.rect.width;
+	S32 button_x_delta = button_params.rect.left; // default value
 	S32 curr_x = x_offset;
 
 	/**
@@ -837,13 +837,16 @@ LLButton* LLFavoritesBarCtrl::createButton(const LLPointer<LLViewerInventoryItem
 	{
 		return NULL;
 	}
-	fav_btn = LLUICtrlFactory::defaultBuilder<LLFavoriteLandmarkButton>(buttonXMLNode, this, NULL);
+	LLButton::Params fav_btn_params(button_params);
+	fav_btn = LLUICtrlFactory::create<LLFavoriteLandmarkButton>(fav_btn_params);
 	if (NULL == fav_btn)
 	{
 		llwarns << "Unable to create LLFavoriteLandmarkButton widget: " << item->getName() << llendl;
 		return NULL;
 	}
 	
+	addChild(fav_btn);
+
 	LLRect butt_rect (fav_btn->getRect());
 	fav_btn->setLandmarkID(item->getUUID());
 	butt_rect.setOriginAndSize(curr_x + button_x_delta, fav_btn->getRect().mBottom, width, fav_btn->getRect().getHeight());
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h
index 2c6d8d15807710791de2b2d9c69674fe78d40b72..62f2825bbe109b44f17b41f78bd52a112619ec5f 100644
--- a/indra/newview/llfavoritesbar.h
+++ b/indra/newview/llfavoritesbar.h
@@ -77,8 +77,8 @@ class LLFavoritesBarCtrl : public LLUICtrl, public LLInventoryObserver
 
 protected:
 	void updateButtons();
-	LLButton* createButton(const LLPointer<LLViewerInventoryItem> item, LLXMLNodePtr &root, S32 x_offset );
-	LLXMLNodePtr getButtonXMLNode();
+	LLButton* createButton(const LLPointer<LLViewerInventoryItem> item, const LLButton::Params& button_params, S32 x_offset );
+	const LLButton::Params& getButtonParams();
 	BOOL collectFavoriteItems(LLInventoryModel::item_array_t &items);
 
 	void onButtonClick(LLUUID id);
diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp
index b7bca5c6cda9bc8a17279839ffce3745073bee8a..3d37c878ad17ef30c39a6f6ac664050ca3dacf57 100644
--- a/indra/newview/llfloaternotificationsconsole.cpp
+++ b/indra/newview/llfloaternotificationsconsole.cpp
@@ -65,7 +65,7 @@ LLNotificationChannelPanel::LLNotificationChannelPanel(const std::string& channe
 	mChannelRejectsPtr = LLNotificationChannelPtr(
 		LLNotificationChannel::buildChannel(channel_name + "rejects", mChannelPtr->getParentChannelName(),
 											!boost::bind(mChannelPtr->getFilter(), _1)));
-	buildPanel(this, "panel_notifications_channel.xml");
+	buildFromFile( "panel_notifications_channel.xml");
 }
 
 BOOL LLNotificationChannelPanel::postBuild()
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index b61d90043ec16f8648ef14e4013006d723ccf573..8c552d0c06b500c21b4ba25385a38f9e843aec0d 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -179,32 +179,32 @@ BOOL LLFloaterRegionInfo::postBuild()
 	mInfoPanels.push_back(panel);
 	panel->getCommitCallbackRegistrar().add("RegionInfo.ManageTelehub",	boost::bind(&LLPanelRegionInfo::onClickManageTelehub, panel));
 	
-	buildPanel(panel, "panel_region_general.xml");
+	panel->buildFromFile("panel_region_general.xml");
 	mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(true));
 
 	panel = new LLPanelRegionDebugInfo;
 	mInfoPanels.push_back(panel);
-	buildPanel(panel, "panel_region_debug.xml");
+	panel->buildFromFile("panel_region_debug.xml");
 	mTab->addTabPanel(panel);
 
 	panel = new LLPanelRegionTextureInfo;
 	mInfoPanels.push_back(panel);
-	buildPanel(panel, "panel_region_texture.xml");
+	panel->buildFromFile("panel_region_texture.xml");
 	mTab->addTabPanel(panel);
 
 	panel = new LLPanelRegionTerrainInfo;
 	mInfoPanels.push_back(panel);
-	buildPanel(panel, "panel_region_terrain.xml");
+	panel->buildFromFile("panel_region_terrain.xml");
 	mTab->addTabPanel(panel);
 
 	panel = new LLPanelEstateInfo;
 	mInfoPanels.push_back(panel);
-	buildPanel(panel, "panel_region_estate.xml");
+	panel->buildFromFile("panel_region_estate.xml");
 	mTab->addTabPanel(panel);
 
 	panel = new LLPanelEstateCovenant;
 	mInfoPanels.push_back(panel);
-	buildPanel(panel, "panel_region_covenant.xml");
+	panel->buildFromFile("panel_region_covenant.xml");
 	mTab->addTabPanel(panel);
 
 	gMessageSystem->setHandlerFunc(
diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp
index a6f3acd18d71ab52d319bcb97a5978d9efbe2865..6a20998245be7fd48cff52aa83f4f5a6f879b7e9 100644
--- a/indra/newview/llfloaterscriptlimits.cpp
+++ b/indra/newview/llfloaterscriptlimits.cpp
@@ -121,7 +121,7 @@ BOOL LLFloaterScriptLimits::postBuild()
 		LLPanelScriptLimitsRegionMemory* panel_memory;
 		panel_memory = new LLPanelScriptLimitsRegionMemory;
 		mInfoPanels.push_back(panel_memory);
-		buildPanel(panel_memory, "panel_script_limits_region_memory.xml");
+		panel_memory->buildFromFile( "panel_script_limits_region_memory.xml");
 		mTab->addTabPanel(panel_memory);
 	}
 	
@@ -130,7 +130,7 @@ BOOL LLFloaterScriptLimits::postBuild()
 	{
 		LLPanelScriptLimitsAttachment* panel_attachments = new LLPanelScriptLimitsAttachment;
 		mInfoPanels.push_back(panel_attachments);
-		buildPanel(panel_attachments, "panel_script_limits_my_avatar.xml");
+		panel_attachments->buildFromFile("panel_script_limits_my_avatar.xml");
 		mTab->addTabPanel(panel_attachments);
 	}
 	
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index 7c2a449343ae937f8f93cd12756d85adb26cce35..19790c88688479fa924e843c2118bb621ce57186 100644
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -837,7 +837,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save)
 		if (save)
 		{
 			LLXMLNodePtr floater_write = new LLXMLNode();			
-			buildFloater(*floaterp, path, floater_write);	// just build it
+			*floaterp->buildFromFile(path, floater_write);	// just build it
 
 			if (!floater_write->isNull())
 			{
@@ -851,7 +851,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save)
 		}
 		else
 		{
-			buildFloater(*floaterp, path, NULL);	// just build it
+			(*floaterp)->buildFromFile(path);	// just build it
 			(*floaterp)->openFloater((*floaterp)->getKey());
 			(*floaterp)->setCanResize((*floaterp)->isResizable());
 		}
@@ -890,7 +890,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save)
 		if (save)
 		{
 			LLXMLNodePtr panel_write = new LLXMLNode();
-			buildPanel(panel, path, panel_write);		// build it
+			panel->buildFromFile(path, panel_write);		// build it
 			
 			if (!panel_write->isNull())
 			{
@@ -904,7 +904,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save)
 		}
 		else
 		{
-			buildPanel(panel, path);		// build it
+			panel->buildFromFile(path);										// build it
 			LLRect new_size = panel->getRect();								// get its rectangle
 			panel->setOrigin(0,0);											// reset its origin point so it's not offset by -left or other XUI attributes
 			(*floaterp)->setTitle(path);									// use the file name as its title, since panels have no guaranteed meaningful name attribute
diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp
index a192cfda3d96a99f0b03fa74fa4a43650929dcc7..639b6649202373e609c991a9b97d64b861b4e0d8 100644
--- a/indra/newview/llfloaterurlentry.cpp
+++ b/indra/newview/llfloaterurlentry.cpp
@@ -88,7 +88,7 @@ LLFloaterURLEntry::LLFloaterURLEntry(LLHandle<LLPanel> parent)
 	: LLFloater(LLSD()),
 	  mPanelLandMediaHandle(parent)
 {
-	buildFloater(this, "floater_url_entry.xml", NULL);
+	buildFromFile("floater_url_entry.xml");
 }
 
 //-----------------------------------------------------------------------------
diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp
index af931810a21bc82dba547e502ff221a3312fa96c..f2ca6ea5d12015b1dc94473e0eeb9209fb6b61aa 100644
--- a/indra/newview/llgrouplist.cpp
+++ b/indra/newview/llgrouplist.cpp
@@ -289,7 +289,7 @@ mGroupNameBox(NULL),
 mInfoBtn(NULL),
 mGroupID(LLUUID::null)
 {
-	buildPanel(this, "panel_group_list_item.xml");
+	buildFromFile( "panel_group_list_item.xml");
 
 	// Remember group icon width including its padding from the name text box,
 	// so that we can hide and show the icon again later.
diff --git a/indra/newview/llhints.cpp b/indra/newview/llhints.cpp
index c4cea86a318f6e873684f0cd4bb2f842b248e39a..e0ced5caeb1cdfe1f97e398d2344e009b155aa91 100644
--- a/indra/newview/llhints.cpp
+++ b/indra/newview/llhints.cpp
@@ -137,9 +137,8 @@ static LLDefaultChildRegistry::Register<LLHintPopup> r("hint_popup");
 
 LLHintPopup::LLHintPopup(const LLHintPopup::Params& p)
 :	mNotification(p.notification),
-	mDirection(p.target_params.direction),
+	mDirection(TOP),
 	mDistance(p.distance),
-	mTarget(p.target_params.target),
 	mArrowLeft(p.left_arrow),
 	mArrowUp(p.up_arrow),
 	mArrowRight(p.right_arrow),
@@ -153,7 +152,12 @@ LLHintPopup::LLHintPopup(const LLHintPopup::Params& p)
 	mFadeOutTime(p.fade_out_time),
 	LLPanel(p)
 {
-	buildPanel(this, "panel_hint.xml", NULL, p);
+	if (p.target_params.isProvided())
+	{
+		mDirection = p.target_params.direction;
+		mTarget = p.target_params.target;
+	}
+	buildFromFile( "panel_hint.xml", NULL, p);
 }
 
 BOOL LLHintPopup::postBuild()
diff --git a/indra/newview/llhudview.cpp b/indra/newview/llhudview.cpp
index beb3b4340aa59ae3b7ebefe751325d41d76e5183..ae3204e35cbe9fe409293eecf3d50ddf5ed4e502 100644
--- a/indra/newview/llhudview.cpp
+++ b/indra/newview/llhudview.cpp
@@ -56,7 +56,7 @@ const S32 HUD_ARROW_SIZE = 32;
 
 LLHUDView::LLHUDView(const LLRect& r)
 {
-	buildPanel(this, "panel_hud.xml");
+	buildFromFile( "panel_hud.xml");
 	setShape(r, true);
 }
 
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 680f937e83f6286237c661cea27bc56c59291659..f0fd7e1b7c3611caaeaaf7f1375b3321217a8b73 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -703,7 +703,7 @@ void LLPanelStandStopFlying::reparent(LLFloaterMove* move_view)
 LLPanelStandStopFlying* LLPanelStandStopFlying::getStandStopFlyingPanel()
 {
 	LLPanelStandStopFlying* panel = new LLPanelStandStopFlying();
-	buildPanel(panel, "panel_stand_stop_flying.xml");
+	panel->buildFromFile("panel_stand_stop_flying.xml");
 
 	panel->setVisible(FALSE);
 	//LLUI::getRootView()->addChild(panel);
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index e53103237c8a0eaa1309cf4f7002b9bc786e9ac2..32b7a702046654c39a8d6266212e5059becd60f1 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -278,7 +278,7 @@ LLNavigationBar::LLNavigationBar()
 	mPurgeTPHistoryItems(false),
 	mSaveToLocationHistory(false)
 {
-	buildPanel(this, "panel_navigation_bar.xml");
+	buildFromFile( "panel_navigation_bar.xml");
 
 	// set a listener function for LoginComplete event
 	LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLNavigationBar::handleLoginComplete, this));
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index f2207e5c00982bf174237b27dccfaf4d5a202a48..d35739d436b8d959b56ca9216e5e89a52b63f08d 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -68,6 +68,29 @@ bool LLOutfitTabNameComparator::compare(const LLAccordionCtrlTab* tab1, const LL
 	return name1 < name2;
 }
 
+const LLAccordionCtrlTab::Params& get_accordion_tab_params()
+{
+	static LLAccordionCtrlTab::Params tab_params;
+	static bool initialized = false;
+	if (!initialized)
+	{
+		initialized = true;
+
+		LLXMLNodePtr xmlNode;
+		if (LLUICtrlFactory::getLayeredXMLNode("outfit_accordion_tab.xml", xmlNode))
+		{
+			LLXUIParser::instance().readXUI(xmlNode, tab_params, "outfit_accordion_tab.xml");
+		}
+		else
+		{
+			llwarns << "Failed to read xml of Outfit's Accordion Tab from outfit_accordion_tab.xml" << llendl;
+		}
+	}
+
+	return tab_params;
+}
+
+
 //////////////////////////////////////////////////////////////////////////
 
 class LLOutfitListGearMenu
@@ -442,8 +465,8 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
 
 		std::string name = cat->getName();
 
-		static LLXMLNodePtr accordionXmlNode = getAccordionTabXMLNode();
-		LLAccordionCtrlTab* tab = LLUICtrlFactory::defaultBuilder<LLAccordionCtrlTab>(accordionXmlNode, NULL, NULL);
+		LLAccordionCtrlTab::Params tab_params(get_accordion_tab_params());
+		LLAccordionCtrlTab* tab = LLUICtrlFactory::create<LLAccordionCtrlTab>(tab_params);
 
 		tab->setName(name);
 		tab->setTitle(name);
@@ -736,19 +759,6 @@ bool LLOutfitsList::hasItemSelected()
 //////////////////////////////////////////////////////////////////////////
 // Private methods
 //////////////////////////////////////////////////////////////////////////
-LLXMLNodePtr LLOutfitsList::getAccordionTabXMLNode()
-{
-	LLXMLNodePtr xmlNode = NULL;
-	bool success = LLUICtrlFactory::getLayeredXMLNode("outfit_accordion_tab.xml", xmlNode);
-	if (!success)
-	{
-		llwarns << "Failed to read xml of Outfit's Accordion Tab from outfit_accordion_tab.xml" << llendl;
-		return NULL;
-	}
-
-	return xmlNode;
-}
-
 void LLOutfitsList::computeDifference(
 	const LLInventoryModel::cat_array_t& vcats, 
 	uuid_vec_t& vadded, 
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index 206854b2326c1936630e44854c8f43af09f8567a..b3bc35dcda09858b659d815b9bf43d9061d0fd50 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -116,12 +116,6 @@ class LLOutfitsList : public LLPanelAppearanceTab
 	bool hasItemSelected();
 
 private:
-	/**
-	 * Reads xml with accordion tab and Flat list from xml file.
-	 *
-	 * @return LLPointer to XMLNode with accordion tab and flat list.
-	 */
-	LLXMLNodePtr getAccordionTabXMLNode();
 
 	/**
 	 * Wrapper for LLCommonUtils::computeDifference. @see LLCommonUtils::computeDifference
diff --git a/indra/newview/llpanelavatartag.cpp b/indra/newview/llpanelavatartag.cpp
index 0ffb10b18b98ca210af5844a2fe2679949f68d46..489222fb2ac62dd4af91ff7d934c17394bef7a69 100644
--- a/indra/newview/llpanelavatartag.cpp
+++ b/indra/newview/llpanelavatartag.cpp
@@ -43,7 +43,7 @@ LLPanelAvatarTag::LLPanelAvatarTag(const LLUUID& key, const std::string im_time)
 	, mAvatarId(LLUUID::null)
 //	, mFadeTimer()
 {
-	buildPanel(this, "panel_avatar_tag.xml");
+	buildFromFile( "panel_avatar_tag.xml");
 	setLeftButtonClickCallback(boost::bind(&LLPanelAvatarTag::onClick, this));
 	setAvatarId(key);
 	setTime(im_time);
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index 4d3d54ed15a317f2ca923af6ef93176077c177cb..8e0ebfa40673b08673661f9451cd52350feb465d 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -144,7 +144,7 @@ LLPanelClassifiedInfo::~LLPanelClassifiedInfo()
 LLPanelClassifiedInfo* LLPanelClassifiedInfo::create()
 {
 	LLPanelClassifiedInfo* panel = new LLPanelClassifiedInfo();
-	buildPanel(panel, "panel_classified_info.xml");
+	panel->buildFromFile("panel_classified_info.xml");
 	return panel;
 }
 
@@ -617,7 +617,7 @@ LLPanelClassifiedEdit::~LLPanelClassifiedEdit()
 LLPanelClassifiedEdit* LLPanelClassifiedEdit::create()
 {
 	LLPanelClassifiedEdit* panel = new LLPanelClassifiedEdit();
-	buildPanel(panel, "panel_edit_classified.xml");
+	panel->buildFromFile("panel_edit_classified.xml");
 	return panel;
 }
 
diff --git a/indra/newview/llpanelgenerictip.cpp b/indra/newview/llpanelgenerictip.cpp
index 709ed33ed14f8fec3a70843892db6868fb4852ff..7a05a2b8e78cbe2ac13a8699d0d45ee842c1c7c6 100644
--- a/indra/newview/llpanelgenerictip.cpp
+++ b/indra/newview/llpanelgenerictip.cpp
@@ -42,7 +42,7 @@ LLPanelGenericTip::LLPanelGenericTip(
 		const LLNotificationPtr& notification) :
 		LLPanelTipToast(notification)
 {
-	buildPanel(this, "panel_generic_tip.xml");
+	buildFromFile( "panel_generic_tip.xml");
 
 	getChild<LLUICtrl>("message")->setValue(notification->getMessage());
 
diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp
index b610fa989995262e371beeb4bad5d365683838ba..5d70e8bb3094f9445a699328a25a5fa7a5282ac5 100644
--- a/indra/newview/llpanelgroupinvite.cpp
+++ b/indra/newview/llpanelgroupinvite.cpp
@@ -375,7 +375,7 @@ LLPanelGroupInvite::LLPanelGroupInvite(const LLUUID& group_id)
 	  mPendingUpdate(FALSE)
 {
 	// Pass on construction of this panel to the control factory.
-	buildPanel(this, "panel_group_invite.xml");
+	buildFromFile( "panel_group_invite.xml");
 }
 
 LLPanelGroupInvite::~LLPanelGroupInvite()
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 9ad39d568c1358ba4882d0915608eb8d6566fe9e..038944802efddb2e336b78ddd19cafe427d08ae8 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -202,7 +202,7 @@ LLLandmarksPanel::LLLandmarksPanel()
 	mInventoryObserver = new LLLandmarksPanelObserver(this);
 	gInventory.addObserver(mInventoryObserver);
 
-	buildPanel(this, "panel_landmarks.xml");
+	buildFromFile( "panel_landmarks.xml");
 }
 
 LLLandmarksPanel::~LLLandmarksPanel()
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 6b71e37337a687afb4abde713f58a09a9b91ce92..637a4968b0754fb3cbbc0315bae2adbd65b3ab23 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -193,7 +193,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
 	// Logo
 	mLogoImage = LLUI::getUIImage("startup_logo");
 
-	buildPanel(this, "panel_login.xml");
+	buildFromFile( "panel_login.xml");
 	
 #if USE_VIEWER_AUTH
 	//leave room for the login menu bar
diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp
index 389fe8edbf866a9069881ed67c07b361a1c7f23d..ca62a676cef99b3bc5cac36c8a3f2e3736635936 100644
--- a/indra/newview/llpanelme.cpp
+++ b/indra/newview/llpanelme.cpp
@@ -168,7 +168,7 @@ void LLPanelMe::onCancelClicked()
 LLPanelMyProfileEdit::LLPanelMyProfileEdit() 
  : LLPanelMyProfile()
 {
-	buildPanel(this, "panel_edit_profile.xml");
+	buildFromFile( "panel_edit_profile.xml");
 
 	setAvatarId(gAgent.getID());
 }
diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp
index 54703d3cdc7a11d6758764f837882d5a12558cf1..b0ee4e92ad6bf08bbb43e2ac9977eb8320ae36b7 100644
--- a/indra/newview/llpanelmediasettingsgeneral.cpp
+++ b/indra/newview/llpanelmediasettingsgeneral.cpp
@@ -80,7 +80,7 @@ LLPanelMediaSettingsGeneral::LLPanelMediaSettingsGeneral() :
 	mMediaEditable(false)
 {
 	// build dialog from XML
-	buildPanel(this, "panel_media_settings_general.xml");
+	buildFromFile( "panel_media_settings_general.xml");
 }
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llpanelmediasettingspermissions.cpp b/indra/newview/llpanelmediasettingspermissions.cpp
index 389003dc45c6285295dcd62ccec947acaad240a4..eebfd6bc7789e59e1c3bdae9487bb119a5ba3c4e 100644
--- a/indra/newview/llpanelmediasettingspermissions.cpp
+++ b/indra/newview/llpanelmediasettingspermissions.cpp
@@ -65,7 +65,7 @@ LLPanelMediaSettingsPermissions::LLPanelMediaSettingsPermissions() :
     mPermsWorldControl( 0 )
 {
     // build dialog from XML
-    buildPanel(this, "panel_media_settings_permissions.xml");
+    buildFromFile( "panel_media_settings_permissions.xml");
 }
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llpanelmediasettingssecurity.cpp b/indra/newview/llpanelmediasettingssecurity.cpp
index 502ba179d3b84cbc6dcd464926dac94d5a459722..75f29f10023e6faa832d2c41dc75a7298dc7372b 100644
--- a/indra/newview/llpanelmediasettingssecurity.cpp
+++ b/indra/newview/llpanelmediasettingssecurity.cpp
@@ -59,7 +59,7 @@ LLPanelMediaSettingsSecurity::LLPanelMediaSettingsSecurity() :
 	mCommitCallbackRegistrar.add("Media.whitelistDelete",	boost::bind(&LLPanelMediaSettingsSecurity::onBtnDel, this));	
 
 	// build dialog from XML
-	buildPanel(this, "panel_media_settings_security.xml");
+	buildFromFile( "panel_media_settings_security.xml");
 }
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp
index e477d71712294db01232fab92a3e3b1fcd417aa6..49567b2ed804f8cf5b083a1fe855ffd3d2ef5924 100644
--- a/indra/newview/llpanelnearbymedia.cpp
+++ b/indra/newview/llpanelnearbymedia.cpp
@@ -102,7 +102,7 @@ LLPanelNearByMedia::LLPanelNearByMedia()
 	mCommitCallbackRegistrar.add("SelectedMediaCtrl.Zoom",		boost::bind(&LLPanelNearByMedia::onClickSelectedMediaZoom, this));
 	mCommitCallbackRegistrar.add("SelectedMediaCtrl.Unzoom",	boost::bind(&LLPanelNearByMedia::onClickSelectedMediaUnzoom, this));
 	
-	buildPanel(this, "panel_nearby_media.xml");
+	buildFromFile( "panel_nearby_media.xml");
 }
 
 LLPanelNearByMedia::~LLPanelNearByMedia()
diff --git a/indra/newview/llpanelonlinestatus.cpp b/indra/newview/llpanelonlinestatus.cpp
index 43c3ed782d5355677918ea0f78d3b3493d9a7eff..e77df757a5e2fd0ae81b2e76ab13184a304c9307 100644
--- a/indra/newview/llpanelonlinestatus.cpp
+++ b/indra/newview/llpanelonlinestatus.cpp
@@ -41,7 +41,7 @@ LLPanelOnlineStatus::LLPanelOnlineStatus(
 	LLPanelTipToast(notification)
 {
 
-	buildPanel(this,
+	buildFromFile(
 			"panel_online_status_toast.xml");
 
 
diff --git a/indra/newview/llpanelpick.cpp b/indra/newview/llpanelpick.cpp
index 0417c65f7ab7b7d53c5fc4e13760a2105ede6ca8..2e87a8eecb2ab243d2703de5c6f9242a05d6a87f 100644
--- a/indra/newview/llpanelpick.cpp
+++ b/indra/newview/llpanelpick.cpp
@@ -80,7 +80,7 @@
 LLPanelPickInfo* LLPanelPickInfo::create()
 {
 	LLPanelPickInfo* panel = new LLPanelPickInfo();
-	buildPanel(panel, XML_PANEL_PICK_INFO);
+	panel->buildFromFile(XML_PANEL_PICK_INFO);
 	return panel;
 }
 
@@ -350,7 +350,7 @@ void LLPanelPickInfo::onClickBack()
 LLPanelPickEdit* LLPanelPickEdit::create()
 {
 	LLPanelPickEdit* panel = new LLPanelPickEdit();
-	buildPanel(panel, XML_PANEL_EDIT_PICK);
+	panel->buildFromFile(XML_PANEL_EDIT_PICK);
 	return panel;
 }
 
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index 653f3726a9377a9d64f056616ef968e98069e158..2efb664f2e3a3941a41a5a3b7abcf2e00c2c283d 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -1045,7 +1045,7 @@ LLPickItem::LLPickItem()
 , mSnapshotID(LLUUID::null)
 , mNeedData(true)
 {
-	buildPanel(this,"panel_pick_list_item.xml");
+	buildFromFile("panel_pick_list_item.xml");
 }
 
 LLPickItem::~LLPickItem()
@@ -1175,7 +1175,7 @@ LLClassifiedItem::LLClassifiedItem(const LLUUID& avatar_id, const LLUUID& classi
  , mAvatarId(avatar_id)
  , mClassifiedId(classified_id)
 {
-	buildPanel(this,"panel_classifieds_list_item.xml");
+	buildFromFile("panel_classifieds_list_item.xml");
 
 	LLAvatarPropertiesProcessor::getInstance()->addObserver(getAvatarId(), this);
 	LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(getClassifiedId());
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 83e674ee9272d6d18ed9d6649d1604b459943efa..e7af7e480db7b36a1b0f7bfc37b308e48be651f0 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -252,7 +252,7 @@ LLPanelPlaces::LLPanelPlaces()
 	LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(
 			boost::bind(&LLPanelPlaces::updateVerbs, this));
 
-	//buildPanel(this, "panel_places.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder()
+	//buildFromFile( "panel_places.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder()
 }
 
 LLPanelPlaces::~LLPanelPlaces()
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index 68522ffac3494fa34e100c90a11ee1fd22669590..6552a296b60baa8b46dd470b340dd1c7821ee587 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -119,7 +119,7 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() :
 	mCommitCallbackRegistrar.add("MediaCtrl.SkipBack",		boost::bind(&LLPanelPrimMediaControls::onClickSkipBack, this));
 	mCommitCallbackRegistrar.add("MediaCtrl.SkipForward",	boost::bind(&LLPanelPrimMediaControls::onClickSkipForward, this));
 	
-	buildPanel(this, "panel_prim_media_controls.xml");
+	buildFromFile( "panel_prim_media_controls.xml");
 	mInactivityTimer.reset();
 	mFadeTimer.stop();
 	mCurrentZoom = ZOOM_NONE;
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index b398d75feb22a1b9f2e4edace8ea09947e4ba237..7e0bd2f8e6bd04f38ed2bb6d85030cf7e2297ca3 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -131,7 +131,7 @@ LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, LLTeleportHistor
 	mRegionName(region_name),
 	mHighlight(hl)
 {
-	buildPanel(this, "panel_teleport_history_item.xml");
+	buildFromFile( "panel_teleport_history_item.xml");
 }
 
 LLTeleportHistoryFlatItem::~LLTeleportHistoryFlatItem()
@@ -382,7 +382,7 @@ LLTeleportHistoryPanel::LLTeleportHistoryPanel()
 		mLastSelectedFlatlList(NULL),
 		mLastSelectedItemIndex(-1)
 {
-	buildPanel(this, "panel_teleport_history.xml");
+	buildFromFile( "panel_teleport_history.xml");
 }
 
 LLTeleportHistoryPanel::~LLTeleportHistoryPanel()
diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp
index 6e69e6d44c24b28899a325bb2a50f7740299f593..1ee143b42ed570215ac43ae6e12155043e1ec11e 100644
--- a/indra/newview/llpaneltopinfobar.cpp
+++ b/indra/newview/llpaneltopinfobar.cpp
@@ -72,7 +72,7 @@ LLPanelTopInfoBar::LLPanelTopInfoBar(): mParcelChangedObserver(0)
 	LLUICtrl::CommitCallbackRegistry::currentRegistrar()
 			.add("TopInfoBar.Action", boost::bind(&LLPanelTopInfoBar::onContextMenuItemClicked, this, _2));
 
-	buildPanel(this, "panel_topinfo_bar.xml");
+	buildFromFile( "panel_topinfo_bar.xml");
 }
 
 LLPanelTopInfoBar::~LLPanelTopInfoBar()
diff --git a/indra/newview/llpanelvolumepulldown.cpp b/indra/newview/llpanelvolumepulldown.cpp
index a038badb01b699e4865417312dd32c8eda32dd51..9d997f23d743ce34b5cbeef4afd2aaecac4deaa8 100644
--- a/indra/newview/llpanelvolumepulldown.cpp
+++ b/indra/newview/llpanelvolumepulldown.cpp
@@ -60,7 +60,7 @@ LLPanelVolumePulldown::LLPanelVolumePulldown()
 
     mCommitCallbackRegistrar.add("Vol.setControlFalse", boost::bind(&LLPanelVolumePulldown::setControlFalse, this, _2));
 	mCommitCallbackRegistrar.add("Vol.GoAudioPrefs", boost::bind(&LLPanelVolumePulldown::onAdvancedButtonClick, this, _2));
-	buildPanel(this, "panel_volume_pulldown.xml");
+	buildFromFile( "panel_volume_pulldown.xml");
 }
 
 BOOL LLPanelVolumePulldown::postBuild()
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index ce465927bb722273f8c7fc0cc77bd364957eabd1..31ea69a88936dd752c701216f236bb09df0e46dd 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -157,7 +157,7 @@ LLFloaterScriptSearch::LLFloaterScriptSearch(LLScriptEdCore* editor_core)
 :	LLFloater(LLSD()),
 	mEditorCore(editor_core)
 {
-	buildFloater(this,"floater_script_search.xml", NULL);
+	buildFromFile("floater_script_search.xml");
 
 	sInstance = this;
 	
@@ -660,7 +660,7 @@ void LLScriptEdCore::onBtnDynamicHelp()
 	if (!live_help_floater)
 	{
 		live_help_floater = new LLFloater(LLSD());
-		LLFloater::buildFloater(live_help_floater, "floater_lsl_guide.xml", NULL);
+		live_help_floater->buildFromFile("floater_lsl_guide.xml", NULL);
 		LLFloater* parent = dynamic_cast<LLFloater*>(getParent());
 		llassert(parent);
 		if (parent)
diff --git a/indra/newview/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp
index 4c2469909bba18633297b16f1e5da6fe6ada72b3..3ca6d62d93b0c21aae309822f0065234c64abf63 100644
--- a/indra/newview/llscrollingpanelparam.cpp
+++ b/indra/newview/llscrollingpanelparam.cpp
@@ -62,7 +62,7 @@ LLScrollingPanelParam::LLScrollingPanelParam( const LLPanel::Params& panel_param
 	  mAllowModify(allow_modify),
 	  mWearable(wearable)
 {
-	buildPanel(this, "panel_scrolling_param.xml");
+	buildFromFile( "panel_scrolling_param.xml");
 
 	// *HACK To avoid hard coding texture position, lets use border's position for texture. 
 	LLViewBorder* left_border = getChild<LLViewBorder>("left_border");
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index aa29f6cb268fe25bfaeacbc4aedabbe1061731d6..cdd27610246e509fbbfd04d1ec2dfca2dcc57c8c 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -56,7 +56,7 @@ LLSidepanelInventory::LLSidepanelInventory()
 		mPanelMainInventory(NULL)
 {
 
-	//buildPanel(this, "panel_inventory.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder()
+	//buildFromFile( "panel_inventory.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder()
 }
 
 LLSidepanelInventory::~LLSidepanelInventory()
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 8d61bb94e1cc8f6db44e0aabe7fb838386f83855..63e54fdeb2baded9e188b1a38a077a8e30f1c216 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -142,7 +142,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect)
 	mBalanceTimer = new LLFrameTimer();
 	mHealthTimer = new LLFrameTimer();
 
-	buildPanel(this,"panel_status_bar.xml");
+	buildFromFile("panel_status_bar.xml");
 }
 
 LLStatusBar::~LLStatusBar()
diff --git a/indra/newview/llsyswellitem.cpp b/indra/newview/llsyswellitem.cpp
index 79b053da240863d0c31e86cab1e531fa12f14ee7..794d413867d131bfe2252494cb81c57d743f74e5 100644
--- a/indra/newview/llsyswellitem.cpp
+++ b/indra/newview/llsyswellitem.cpp
@@ -44,7 +44,7 @@ LLSysWellItem::LLSysWellItem(const Params& p) : LLPanel(p),
 												mTitle(NULL),
 												mCloseBtn(NULL)
 {
-	buildPanel(this, "panel_sys_well_item.xml");
+	buildFromFile( "panel_sys_well_item.xml");
 
 	mTitle = getChild<LLTextBox>("title");
 	mCloseBtn = getChild<LLButton>("close_btn");
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index 89fd22a2a0c49eb5e7f6ec50c32d2e5902856d49..d971318f21c62611f5b1b55db065e5112c7eb4bc 100644
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -255,7 +255,7 @@ LLIMWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID&
 		S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId) :
 		LLPanel(LLPanel::Params()), mChiclet(NULL), mParent(parent)
 {
-	buildPanel(this, "panel_activeim_row.xml", NULL);
+	buildFromFile( "panel_activeim_row.xml", NULL);
 
 	// Choose which of the pre-created chiclets (IM/group) to use.
 	// The other one gets hidden.
@@ -352,7 +352,7 @@ LLIMWellWindow::ObjectRowPanel::ObjectRowPanel(const LLUUID& notification_id, bo
  : LLPanel()
  , mChiclet(NULL)
 {
-	buildPanel(this, "panel_active_object_row.xml", NULL);
+	buildFromFile( "panel_active_object_row.xml", NULL);
 
 	initChiclet(notification_id);
 
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 06c95b5e9cc5c091c39d7ff156fa90f4e9056470..5fdc6765a8226b3d41a9c934e34001be9f3875fe 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -83,7 +83,7 @@ LLToast::LLToast(const LLToast::Params& p)
 {
 	mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs));
 
-	buildFloater(this, "panel_toast.xml", NULL);
+	buildFromFile("panel_toast.xml", NULL);
 
 	setCanDrag(FALSE);
 
diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp
index 7c2e68f94285d0a3a655a153aeb6668d84f791d8..f76c9adb78fffc63325722ece0b0769d7ecd64d6 100644
--- a/indra/newview/lltoastgroupnotifypanel.cpp
+++ b/indra/newview/lltoastgroupnotifypanel.cpp
@@ -60,7 +60,7 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(LLNotificationPtr& notification
 :	LLToastPanel(notification),
 	mInventoryOffer(NULL)
 {
-	buildPanel(this, "panel_group_notify.xml");
+	buildFromFile( "panel_group_notify.xml");
 	const LLSD& payload = notification->getPayload();
 	LLGroupData groupData;
 	if (!gAgent.getGroupData(payload["group_id"].asUUID(),groupData))
diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp
index fc01b7f0d5d909812968ffe4b48af1d6ba820dce..ffe6c80f323dfc315e58f6aebd2fe987da2bbb03 100644
--- a/indra/newview/lltoastimpanel.cpp
+++ b/indra/newview/lltoastimpanel.cpp
@@ -51,7 +51,7 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) :	LLToastPanel(p.notif
 								mAvatarIcon(NULL), mAvatarName(NULL),
 								mTime(NULL), mMessage(NULL), mGroupIcon(NULL)
 {
-	buildPanel(this, "panel_instant_message.xml");
+	buildFromFile( "panel_instant_message.xml");
 
 	mGroupIcon = getChild<LLGroupIconCtrl>("group_icon");
 	mAvatarIcon = getChild<LLAvatarIconCtrl>("avatar_icon");
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index 32e12035ee90ebfb07ce521de81ebe621fd6f2a6..0f22cb77785f339dbc04b8e2edf6e6ed64ef1adf 100644
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -67,7 +67,7 @@ mNumButtons(0),
 mAddedDefaultBtn(false),
 mCloseNotificationOnDestroy(true)
 {
-	buildPanel(this, "panel_notification.xml");
+	buildFromFile( "panel_notification.xml");
 	if(rect != LLRect::null)
 	{
 		this->setShape(rect);
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 141d7d6b865fd6fb1ff3d84ba300a098f63506ab..602e641fe85b1abfd5ade1993a49a41e656030f6 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -7255,7 +7255,7 @@ void handle_load_from_xml(void*)
 	{
 		std::string filename = picker.getFirstFile();
 		LLFloater* floater = new LLFloater(LLSD());
-		LLFloater::buildFloater(floater, filename, NULL);
+		floater->buildFromFile(filename);
 	}
 }
 
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index c5dee710cbf3db5797506897c0d375d0a1bd03ee..ac45daf810d569c81211c12d339280295dac4d24 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1521,7 +1521,7 @@ void LLViewerWindow::initBase()
 	// (But wait to add it as a child of the root view so that it will be in front of the 
 	// other views.)
 	MainPanel* main_view = new MainPanel();
-	LLPanel::buildPanel(main_view, "main_view.xml");
+	main_view->buildFromFile("main_view.xml");
 	main_view->setShape(full_window);
 	getRootView()->addChild(main_view);