diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index a0275b6ed5f3a24e28e4b577fae9444960dfcaec..940c7e7e1863837320166e3bbf9fc7b31cc3015a 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -208,8 +208,8 @@ S32 LLLayoutStack::getDefaultWidth(S32 cur_width)
 
 void LLLayoutStack::movePanel(LLPanel* panel_to_move, LLPanel* target_panel, bool move_to_front)
 {
-	LayoutPanel* embedded_panel_to_move = findEmbeddedPanel(panel_to_move);
-	LayoutPanel* embedded_target_panel = move_to_front ? *mPanels.begin() : findEmbeddedPanel(target_panel);
+	LLLayoutPanel* embedded_panel_to_move = findEmbeddedPanel(panel_to_move);
+	LLLayoutPanel* embedded_target_panel = move_to_front ? *mPanels.begin() : findEmbeddedPanel(target_panel);
 
 	if (!embedded_panel_to_move || !embedded_target_panel || embedded_panel_to_move == embedded_target_panel)
 	{
diff --git a/indra/newview/llagentui.h b/indra/newview/llagentui.h
index afc0ba5d9a623d86fe4df0d043a744e4109b11f5..be7d0c365a6c2c159db29aeb4a0e96b4d4048eb6 100644
--- a/indra/newview/llagentui.h
+++ b/indra/newview/llagentui.h
@@ -26,7 +26,6 @@
 
 #ifndef LLAGENTUI_H
 #define LLAGENTUI_H
-
 class LLSLURL;
 
 class LLAgentUI
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 333c92e50da2e910d2f54ac4830facf5370ce967..3b374947a05ba03646d490bb449cadf2aecb8bcf 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -46,6 +46,7 @@
 #include "llmd5.h"
 #include "llpumpio.h"
 #include "llmimetypes.h"
+#include "llmodaldialog.h"
 #include "llslurl.h"
 #include "llstartup.h"
 #include "llfocusmgr.h"
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h
index 35e00924aa89213b2c0e5ef436e2ed2cf8d063f1..6225d4c92c52a56f5d2e69dd3fb3923c877823c7 100644
--- a/indra/newview/llbottomtray.h
+++ b/indra/newview/llbottomtray.h
@@ -29,6 +29,7 @@
 
 #include "llpanel.h"
 #include "llimview.h"
+#include "llbutton.h"
 
 class LLChicletPanel;
 class LLLayoutStack;
diff --git a/indra/newview/llbrowsernotification.cpp b/indra/newview/llbrowsernotification.cpp
index cc54d10944d05b8a89060a52c19ad6f5493923e4..8eb0bb1e0b5d8ebd03c93255dec308104f2f3cb2 100644
--- a/indra/newview/llbrowsernotification.cpp
+++ b/indra/newview/llbrowsernotification.cpp
@@ -28,9 +28,9 @@
 #include "llviewerprecompiledheaders.h" // must be first include
 
 #include "llnotificationhandler.h"
-#include "llnotifications.h"
-#include "llfloatermediabrowser.h"
-#include "llfloaterreg.h"
+//#include "llnotifications.h"
+//#include "llfloatermediabrowser.h"
+//#include "llfloaterreg.h"
 
 using namespace LLNotificationsUI;
 
diff --git a/indra/newview/llimhandler.cpp b/indra/newview/llimhandler.cpp
index bc76092a2014d39099a4e57c2250030d7508a3d5..e8c905a2664c93c563f4fe436ac2e8d87678dbab 100644
--- a/indra/newview/llimhandler.cpp
+++ b/indra/newview/llimhandler.cpp
@@ -28,6 +28,7 @@
 #include "llviewerprecompiledheaders.h" // must be first include
 
 #include "llnotificationhandler.h"
+#include "llchannelmanager.h"
 
 #include "llagentdata.h"
 #include "llnotifications.h"
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index 303f2abcced6b811c8e3e37f8a2b555afb0c8f5c..83777af31acf527df8c184d1f9e7cec1a385229a 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -28,7 +28,7 @@
 
 #include "llagentdata.h" // for gAgentID
 #include "llnearbychathandler.h"
-
+#include "llchannelmanager.h"
 #include "llbottomtray.h"
 #include "llchatitemscontainerctrl.h"
 #include "llfirstuse.h"
@@ -36,6 +36,7 @@
 #include "llhints.h"
 #include "llnearbychat.h"
 #include "llrecentpeople.h"
+#include "llscreenchannel.h"
 
 #include "llviewercontrol.h"
 
diff --git a/indra/newview/llnotificationalerthandler.cpp b/indra/newview/llnotificationalerthandler.cpp
index dcbf6b64ce295ef9d454162acac1c9677a533210..6b9bd0436f4a592b2208897b245e6bad0cd73ff3 100644
--- a/indra/newview/llnotificationalerthandler.cpp
+++ b/indra/newview/llnotificationalerthandler.cpp
@@ -28,7 +28,7 @@
 #include "llviewerprecompiledheaders.h" // must be first include
 
 #include "llnotificationhandler.h"
-
+#include "llchannelmanager.h"
 #include "llnotifications.h"
 #include "llprogressview.h"
 #include "lltoastnotifypanel.h"
diff --git a/indra/newview/llnotificationgrouphandler.cpp b/indra/newview/llnotificationgrouphandler.cpp
index 9933a8a49c88876421bec2bc7c5b72f2da32c26e..3819cb06e83e6cc88c1e9a3bbb241c392c3f7a19 100644
--- a/indra/newview/llnotificationgrouphandler.cpp
+++ b/indra/newview/llnotificationgrouphandler.cpp
@@ -26,6 +26,7 @@
 
 #include "llviewerprecompiledheaders.h" // must be first include
 
+#include "llchannelmanager.h"
 #include "llnotificationhandler.h"
 #include "lltoastgroupnotifypanel.h"
 #include "llgroupactions.h"
diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h
index 28a69f2373605ebdfd41407c5928348f74391361..f20ddd20d5bc098d6e6bbc08ef08a8784b2c8f49 100644
--- a/indra/newview/llnotificationhandler.h
+++ b/indra/newview/llnotificationhandler.h
@@ -27,19 +27,17 @@
 #ifndef LL_LLNOTIFICATIONHANDLER_H
 #define LL_LLNOTIFICATIONHANDLER_H
 
-
-#include "llwindow.h"
-
-//#include "llnotificationsutil.h"
-#include "llchannelmanager.h"
-#include "llchat.h"
-#include "llinstantmessage.h"
-#include "llnotificationptr.h"
-
 class LLIMFloater;
+class LLChat;
+
+typedef boost::shared_ptr<class LLNotification> LLNotificationPtr;
+enum EInstantMessage;
+typedef enum e_chat_source_type EChatSourceType;
 
 namespace LLNotificationsUI
 {
+	class LLToast;
+
 // ENotificationType enumerates all possible types of notifications that could be met
 // 
 typedef enum e_notification_type
@@ -103,7 +101,7 @@ class LLEventHandler
 	// at the moment, when a handlers creates a channel.
 	virtual void initChannel()=0;
 
-	LLScreenChannelBase*	mChannel;
+	class LLScreenChannelBase*	mChannel;
 	e_notification_type		mType;
 
 };
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index 4231a73af1b977479e26c80e796c150bd2247160..7c82ca0da958984f8d88e6070890a611d4961983 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -34,6 +34,7 @@
 #include "llfloaterreg.h"
 #include "llnearbychat.h"
 #include "llimfloater.h"
+#include "llscreenchannel.h"
 
 using namespace LLNotificationsUI;
 
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp
index 85f95bd0c718ef0a2f395e6df1ca24d4e9210bed..2c10aac06c9cf6b9702f9835fc64a96117c2060e 100644
--- a/indra/newview/llnotificationofferhandler.cpp
+++ b/indra/newview/llnotificationofferhandler.cpp
@@ -27,6 +27,7 @@
 
 #include "llviewerprecompiledheaders.h" // must be first include
 
+#include "llchannelmanager.h"
 #include "llnotificationhandler.h"
 #include "lltoastnotifypanel.h"
 #include "llviewercontrol.h"
diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp
index b4d28bb346ac531aaca75e5102e3266f83f7e6f6..89b29756fbf8e40b459fdc91683a9a8e65721ce7 100644
--- a/indra/newview/llnotificationscripthandler.cpp
+++ b/indra/newview/llnotificationscripthandler.cpp
@@ -27,6 +27,7 @@
 
 #include "llviewerprecompiledheaders.h" // must be first include
 
+#include "llchannelmanager.h"
 #include "llnotificationhandler.h"
 #include "lltoastnotifypanel.h"
 #include "llviewercontrol.h"
diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp
index 94612975a2615e2849f9f60ed042c7e822f4d748..3c1cd107df7bd6ee0d044c556e357c48aae2680d 100644
--- a/indra/newview/llnotificationtiphandler.cpp
+++ b/indra/newview/llnotificationtiphandler.cpp
@@ -27,6 +27,8 @@
 
 #include "llviewerprecompiledheaders.h" // must be first include
 
+#include "llchannelmanager.h"
+#include "llinstantmessage.h"
 #include "llfloaterreg.h"
 #include "llnearbychat.h"
 #include "llnotificationhandler.h"
@@ -36,6 +38,7 @@
 #include "llviewerwindow.h"
 #include "llnotificationmanager.h"
 #include "llpaneltiptoast.h"
+#include "lltoast.h"
 
 using namespace LLNotificationsUI;
 
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index 99342bb564c0e0ab0a33bb7823450cfaec0c5598..ca9302735296f4e5a40d9d1615e62e0c8bbdf326 100644
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -40,6 +40,7 @@
 #include "llviewerwindow.h"
 
 #include "llchiclet.h"
+#include "llchannelmanager.h"
 #include "lltoastpanel.h"
 #include "llnotificationmanager.h"
 #include "llnotificationsutil.h"
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 48d11e1f05d26d88bdb36a2af356ea6324959715..317d08cc5298470c3e118d8a7afdfc584a3b5258 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -49,6 +49,7 @@
 #include "llagent.h"
 #include "llagentcamera.h"
 #include "llcallingcard.h"
+#include "llchannelmanager.h"
 #include "llbuycurrencyhtml.h"
 #include "llfirstuse.h"
 #include "llfloaterbuyland.h"
@@ -76,11 +77,13 @@
 #include "llstatenums.h"
 #include "llstatusbar.h"
 #include "llimview.h"
+#include "llscreenchannel.h"
 #include "llspeakers.h"
 #include "lltrans.h"
 #include "lltranslate.h"
 #include "llviewerfoldertype.h"
 #include "lluri.h"
+#include "llviewercontrol.h"
 #include "llviewergenericmessage.h"
 #include "llviewermenu.h"
 #include "llviewerjoystick.h"