diff --git a/src/apps/deskbar/BarApp.cpp b/src/apps/deskbar/BarApp.cpp
index 2647068..856a5f9 100644
--- a/src/apps/deskbar/BarApp.cpp
+++ b/src/apps/deskbar/BarApp.cpp
@@ -60,8 +60,6 @@ All rights reserved.
 #include "PublicCommands.h"
 #include "ResourceSet.h"
 #include "Switcher.h"
-#include "TeamMenu.h"
-#include "WindowMenuItem.h"
 
 
 BLocker TBarApp::sSubscriberLock;
@@ -72,8 +70,8 @@ BList TBarApp::sSubscribers;
 const uint32 kShowBeMenu = 'BeMn';
 const uint32 kShowTeamMenu = 'TmMn';
 
-const BRect kIconSize(0.0f, 0.0f, 15.0f, 15.0f);
 
+const BRect kIconRect(0.0f, 0.0f, 15.0f, 15.0f);
 static const color_space kIconFormat = B_RGBA32;
 
 
@@ -313,8 +311,6 @@ TBarApp::InitSettings()
 void
 TBarApp::MessageReceived(BMessage* message)
 {
-	int32 count;
-	bool enabled;
 	switch (message->what) {
 		case 'gloc':
 		case 'sloc':
@@ -353,6 +349,9 @@ TBarApp::MessageReceived(BMessage* message)
 			break;
 
 		case kUpdateRecentCounts:
+			int32 count;
+			bool enabled;
+
 			if (message->FindInt32("applications", &count) == B_OK)
 				fSettings.recentAppsCount = count;
 			if (message->FindBool("applicationsEnabled", &enabled) == B_OK)
@@ -423,9 +422,8 @@ TBarApp::MessageReceived(BMessage* message)
 		{
 			fSettings.autoRaise = !fSettings.autoRaise;
 
-			TBarView* barView = static_cast<TBarApp*>(be_app)->BarView();
 			fBarWindow->Lock();
-			barView->UpdateAutoRaise();
+			BarView()->UpdateAutoRaise();
 			fBarWindow->Unlock();
 			break;
 		}
@@ -434,9 +432,8 @@ TBarApp::MessageReceived(BMessage* message)
 		{
 			fSettings.trackerAlwaysFirst = !fSettings.trackerAlwaysFirst;
 
-			TBarView* barView = static_cast<TBarApp*>(be_app)->BarView();
 			fBarWindow->Lock();
-			barView->UpdatePlacement();
+			BarView()->UpdatePlacement();
 			fBarWindow->Unlock();
 			break;
 		}
@@ -445,9 +442,8 @@ TBarApp::MessageReceived(BMessage* message)
 		{
 			fSettings.sortRunningApps = !fSettings.sortRunningApps;
 
-			TBarView* barView = static_cast<TBarApp*>(be_app)->BarView();
 			fBarWindow->Lock();
-			barView->UpdatePlacement();
+			BarView()->UpdatePlacement();
 			fBarWindow->Unlock();
 			break;
 		}
@@ -464,9 +460,8 @@ TBarApp::MessageReceived(BMessage* message)
 		{
 			fSettings.superExpando = !fSettings.superExpando;
 
-			TBarView* barView = static_cast<TBarApp*>(be_app)->BarView();
 			fBarWindow->Lock();
-			barView->UpdatePlacement();
+			BarView()->UpdatePlacement();
 			fBarWindow->Unlock();
 			break;
 		}
@@ -475,9 +470,8 @@ TBarApp::MessageReceived(BMessage* message)
 		{
 			fSettings.expandNewTeams = !fSettings.expandNewTeams;
 
-			TBarView* barView = static_cast<TBarApp*>(be_app)->BarView();
 			fBarWindow->Lock();
-			barView->UpdatePlacement();
+			BarView()->UpdatePlacement();
 			fBarWindow->Unlock();
 			break;
 		}
@@ -636,7 +630,7 @@ TBarApp::AddTeam(team_id team, uint32 flags, const char* sig, entry_ref* ref)
 	BAppFileInfo appMime(&file);
 
 	BarTeamInfo* barInfo = new BarTeamInfo(new BList(), flags, strdup(sig),
-		new BBitmap(kIconSize, kIconFormat), strdup(ref->name));
+		new BBitmap(kIconRect, kIconFormat), strdup(ref->name));
 
 	barInfo->teams->AddItem((void*)team);
 	if (appMime.GetIcon(barInfo->icon, B_MINI_ICON) != B_OK)
diff --git a/src/apps/deskbar/BarMenuTitle.h b/src/apps/deskbar/BarMenuTitle.h
index be7aa99..870c6f7 100644
--- a/src/apps/deskbar/BarMenuTitle.h
+++ b/src/apps/deskbar/BarMenuTitle.h
@@ -46,7 +46,7 @@ class BMenu;
 
 class TBarMenuTitle : public BMenuItem {
 public:
- 	TBarMenuTitle(float width,float height, const BBitmap* icon,
+	TBarMenuTitle(float width, float height, const BBitmap* icon,
  		BMenu* menu, bool inexpando = false);
 	virtual ~TBarMenuTitle();
 
diff --git a/src/apps/deskbar/BarView.cpp b/src/apps/deskbar/BarView.cpp
index 53dfeec..73f269c 100644
--- a/src/apps/deskbar/BarView.cpp
+++ b/src/apps/deskbar/BarView.cpp
@@ -424,7 +424,7 @@ TBarView::UpdateAutoRaise()
 void
 TBarView::UpdatePlacement()
 {
-	ChangeState(fState, fVertical, fLeft, fTop);	
+	ChangeState(fState, fVertical, fLeft, fTop);
 }
 
 
@@ -634,8 +634,8 @@ TBarView::DragStart()
 			if (item == fLastDragItem)
 				return B_OK;
 
-			fLastDragItem = item;		
-		}					
+			fLastDragItem = item;
+		}
 	}
 
 	return B_OK;
diff --git a/src/apps/deskbar/BarWindow.cpp b/src/apps/deskbar/BarWindow.cpp
index 26b02b7..756bfc6 100644
--- a/src/apps/deskbar/BarWindow.cpp
+++ b/src/apps/deskbar/BarWindow.cpp
@@ -312,7 +312,7 @@ TBarWindow::ShowBeMenu()
 	if (menuBar == NULL)
 		return;
 
-	BMenuBar_StartMenuBar_Hack(menuBar,0,true,true,NULL);
+	BMenuBar_StartMenuBar_Hack(menuBar, 0, true, true, NULL);
 }
 
 
@@ -326,7 +326,7 @@ TBarWindow::ShowTeamMenu()
 	if (KeyMenuBar() == NULL)
 		return;
 
-	BMenuBar_StartMenuBar_Hack(KeyMenuBar(),index,true,true,NULL);
+	BMenuBar_StartMenuBar_Hack(KeyMenuBar(), index, true, true, NULL);
 }
 
 
diff --git a/src/apps/deskbar/ExpandoMenuBar.cpp b/src/apps/deskbar/ExpandoMenuBar.cpp
index 0fd4483..e686078 100644
--- a/src/apps/deskbar/ExpandoMenuBar.cpp
+++ b/src/apps/deskbar/ExpandoMenuBar.cpp
@@ -713,10 +713,9 @@ void
 TExpandoMenuBar::CheckForSizeOverrun()
 {
 	BRect screenFrame = (BScreen(Window())).Frame();
-	if (fVertical)
-		fIsScrolling = Window()->Frame().bottom > screenFrame.bottom;
-	else
-		fIsScrolling = false;
+
+	fIsScrolling = fVertical ? Window()->Frame().bottom > screenFrame.bottom
+							 : false;
 }
 
 
@@ -744,7 +743,7 @@ TExpandoMenuBar::monitor_team_windows(void* arg)
 			// Set all WindowMenuItems to require an update.
 			TWindowMenuItem* item = NULL;
 			for (int32 i = 0; i < totalItems; i++) {
-				if (!teamMenu->SubmenuAt(i)){
+				if (!teamMenu->SubmenuAt(i)) {
 					item = static_cast<TWindowMenuItem*>(teamMenu->ItemAt(i));
 					item->SetRequireUpdate();
 				}
@@ -814,7 +813,7 @@ TExpandoMenuBar::monitor_team_windows(void* arg)
 
 			// Remove any remaining items which require an update.
 			for (int32 i = 0; i < totalItems; i++) {
-				if (!teamMenu->SubmenuAt(i)){
+				if (!teamMenu->SubmenuAt(i)) {
 					item = static_cast<TWindowMenuItem*>(teamMenu->ItemAt(i));
 					if (item && item->RequiresUpdate()) {
 						item = static_cast<TWindowMenuItem*>
diff --git a/src/apps/deskbar/PreferencesWindow.cpp b/src/apps/deskbar/PreferencesWindow.cpp
index aecbba7..ed3dea1 100644
--- a/src/apps/deskbar/PreferencesWindow.cpp
+++ b/src/apps/deskbar/PreferencesWindow.cpp
@@ -83,7 +83,7 @@ PreferencesWindow::PreferencesWindow(BRect frame)
 
 	// Values
 	TBarApp* barApp = static_cast<TBarApp*>(be_app);
-	desk_settings* appSettings = barApp->Settings();;
+	desk_settings* appSettings = barApp->Settings();
 
 	fAppsSort->SetValue(appSettings->sortRunningApps);
 	fAppsSortTrackerFirst->SetValue(appSettings->trackerAlwaysFirst);
diff --git a/src/apps/deskbar/Switcher.cpp b/src/apps/deskbar/Switcher.cpp
index 86df52d..30eaaa0 100644
--- a/src/apps/deskbar/Switcher.cpp
+++ b/src/apps/deskbar/Switcher.cpp
@@ -1893,7 +1893,7 @@ TIconView::CacheIcons(TTeamGroup* teamGroup)
 void
 TIconView::AnimateIcon(BBitmap* startIcon, BBitmap* endIcon)
 {
-	BRect centerRect(kCenterSlot*kSlotSize, 0,
+	BRect centerRect(kCenterSlot * kSlotSize, 0,
 		(kCenterSlot + 1) * kSlotSize - 1, kSlotSize - 1);
 	BRect startIconBounds = startIcon->Bounds();
 	BRect bounds = Bounds();
diff --git a/src/apps/deskbar/TeamMenuItem.cpp b/src/apps/deskbar/TeamMenuItem.cpp
index cbd669f..1610105 100644
--- a/src/apps/deskbar/TeamMenuItem.cpp
+++ b/src/apps/deskbar/TeamMenuItem.cpp
@@ -71,7 +71,7 @@ TTeamMenuItem::TTeamMenuItem(BList* team, BBitmap* icon, char* name, char* sig,
 }
 
 
-TTeamMenuItem::TTeamMenuItem(float width,float height,bool vertical)
+TTeamMenuItem::TTeamMenuItem(float width, float height, bool vertical)
 	:	BMenuItem("", NULL)
 {
 	InitData(NULL, NULL, strdup(""), strdup(""), width, height, false, vertical);
@@ -491,7 +491,7 @@ void
 TTeamMenuItem::ToggleExpandState(bool resizeWindow)
 {
 	fExpanded = !fExpanded;
-	
+
 	if (fExpanded) {
 		// Populate Menu() with the stuff from SubMenu().
 		TWindowMenu* sub = (static_cast<TWindowMenu*>(Submenu()));
@@ -503,7 +503,7 @@ TTeamMenuItem::ToggleExpandState(bool resizeWindow)
 			if (locked)
 				sub->UnlockLooper();
 
-			if (sub->CountItems() > 1){
+			if (sub->CountItems() > 1) {
 				TExpandoMenuBar* parent = static_cast<TExpandoMenuBar*>(Menu());
 				int myindex = parent->IndexOf(this) + 1;
 
