diff --git a/lang/cat.l b/lang/cat.l
index dc94b0706..c3a18bdcf 100644
--- a/lang/cat.l
+++ b/lang/cat.l
@@ -3423,7 +3423,7 @@ NEWS_HELP_LOGON
 	
 	Edits or displays the list of logon news messages.  When a
 	user connects to the network, these messages will be sent
-	to them.  (However, no more than %s messages will be
+	to them.  (However, no more than %d messages will be
 	sent in order to avoid flooding the user.  If there are
 	more news messages, only the most recent will be sent.)
 	NewsCount can be configured in services.conf.
@@ -3437,7 +3437,7 @@ NEWS_HELP_OPER
 	
 	Edits or displays the list of oper news messages.  When a
 	user opers up (with the /OPER command), these messages will
-	be sent to them.  (However, no more than %s messages will
+	be sent to them.  (However, no more than %d messages will
 	be sent in order to avoid flooding the user.  If there are
 	more news messages, only the most recent will be sent.)
 	NewsCount can be configured in services.conf.
diff --git a/lang/de.l b/lang/de.l
index 96ec46b02..261760106 100644
--- a/lang/de.l
+++ b/lang/de.l
@@ -3373,7 +3373,7 @@ NEWS_HELP_LOGON
 	
 	Zeigt oder bearbeitet die Liste der LogonNews.
 	Nach der Verbindung des Users werden diese Nachrichten
-	angezeigt. (Es werden jedoch nur max. %s angezeigt, um ein
+	angezeigt. (Es werden jedoch nur max. %d angezeigt, um ein
 	Flooding des Users zu verhindern. Wenn mehr News
 	existieren, werden nur die neuesten angezeigt.)
 	Die Anzahl der News können in der services.conf festgelegt werden.
@@ -3388,7 +3388,7 @@ NEWS_HELP_OPER
 	Zeigt oder bearbeitet die Liste der Oper-News.Nachdem 
 	sich ein User die Oper-Flags gesetzt hat (mit dem
 	/OPER Befehl) werden ihm diese Nachrichten angezeigt.
-	(Es werden jedoch nur max. %s Nachrichten angezeigt, um ein
+	(Es werden jedoch nur max. %d Nachrichten angezeigt, um ein
 	Flooding des Users zu verhindern. Wenn mehr News
 	existieren, werden nur die neüsten angezeigt.)
 	Die Anzahl der News können in der services.conf festgelegt werden.
diff --git a/lang/en_us.l b/lang/en_us.l
index 9cf6c6316..72db6eb3b 100644
--- a/lang/en_us.l
+++ b/lang/en_us.l
@@ -3283,7 +3283,7 @@ NEWS_HELP_LOGON
 	
 	Edits or displays the list of logon news messages.  When a
 	user connects to the network, these messages will be sent
-	to them.  (However, no more than %s messages will be
+	to them.  (However, no more than %d messages will be
 	sent in order to avoid flooding the user.  If there are
 	more news messages, only the most recent will be sent.)
 	NewsCount can be configured in services.conf.
@@ -3297,7 +3297,7 @@ NEWS_HELP_OPER
 	
 	Edits or displays the list of oper news messages.  When a
 	user opers up (with the /OPER command), these messages will
-	be sent to them.  (However, no more than %s messages will
+	be sent to them.  (However, no more than %d messages will
 	be sent in order to avoid flooding the user.  If there are
 	more news messages, only the most recent will be sent.)
 	NewsCount can be configured in services.conf.
diff --git a/lang/es.l b/lang/es.l
index 86a00a0da..88a451350 100644
--- a/lang/es.l
+++ b/lang/es.l
@@ -3397,7 +3397,7 @@ NEWS_HELP_LOGON
 	
 	Edits or displays the list of logon news messages.  When a
 	user connects to the network, these messages will be sent
-	to them.  (However, no more than %s messages will be
+	to them.  (However, no more than %d messages will be
 	sent in order to avoid flooding the user.  If there are
 	more news messages, only the most recent will be sent.)
 	NewsCount can be configured in services.conf.
@@ -3411,7 +3411,7 @@ NEWS_HELP_OPER
 	
 	Edits or displays the list of oper news messages.  When a
 	user opers up (with the /OPER command), these messages will
-	be sent to them.  (However, no more than %s messages will
+	be sent to them.  (However, no more than %d messages will
 	be sent in order to avoid flooding the user.  If there are
 	more news messages, only the most recent will be sent.)
 	NewsCount can be configured in services.conf.
diff --git a/lang/fr.l b/lang/fr.l
index 2d0eaeb07..a13b8587a 100644
--- a/lang/fr.l
+++ b/lang/fr.l
@@ -3483,7 +3483,7 @@ NEWS_HELP_LOGON
 	
 	Édite ou affiche la liste de messages Logon News. Lorsqu'un 
 	utilisateur se connecte au réseau, ces messages leur seront 
-	envoyés. (Cependant, pas plus de %s messages ne seront envoyés 
+	envoyés. (Cependant, pas plus de %d messages ne seront envoyés 
 	pour éviter le flood des utilisateurs. Si il y a plusieurs 
 	messages de news, seuls les plus récents seront envoyés.) Le 
 	nombre de news envoyées peut être configuré dans le 
@@ -3498,7 +3498,7 @@ NEWS_HELP_OPER
 	
 	Édite ou affiche la liste des messages Oper News. Quand un 
 	utilisateur utilise la commande /OPER, ces messages lui seront 
-	envoyés. (Cependant, pas plus de %s messages ne seront envoyés 
+	envoyés. (Cependant, pas plus de %d messages ne seront envoyés 
 	afin de ne pas flooder l'utilisateur. Si il y a plusieurs 
 	messages news, seuls les plus récents seront envoyés.) Le nombre 
 	de news envoyées peut être configuré dans le services.conf.
diff --git a/lang/gr.l b/lang/gr.l
index ae504132a..48f5cbc3d 100644
--- a/lang/gr.l
+++ b/lang/gr.l
@@ -3415,7 +3415,7 @@ NEWS_HELP_LOGON
 	
 	Edits or displays the list of logon news messages.  When a
 	user connects to the network, these messages will be sent
-	to them.  (However, no more than %s messages will be
+	to them.  (However, no more than %d messages will be
 	sent in order to avoid flooding the user.  If there are
 	more news messages, only the most recent will be sent.)
 	NewsCount can be configured in services.conf.
@@ -3429,7 +3429,7 @@ NEWS_HELP_OPER
 	
 	Edits or displays the list of oper news messages.  When a
 	user opers up (with the /OPER command), these messages will
-	be sent to them.  (However, no more than %s messages will
+	be sent to them.  (However, no more than %d messages will
 	be sent in order to avoid flooding the user.  If there are
 	more news messages, only the most recent will be sent.)
 	NewsCount can be configured in services.conf.
diff --git a/lang/hun.l b/lang/hun.l
index 590c5ab26..11fa09fca 100644
--- a/lang/hun.l
+++ b/lang/hun.l
@@ -3349,7 +3349,7 @@ NEWS_HELP_LOGON
 	
 	Edits or displays the list of logon news messages.  When a
 	user connects to the network, these messages will be sent
-	to them.  (However, no more than %s messages will be
+	to them.  (However, no more than %d messages will be
 	sent in order to avoid flooding the user.  If there are
 	more news messages, only the most recent will be sent.)
 	NewsCount can be configured in services.conf.
@@ -3363,7 +3363,7 @@ NEWS_HELP_OPER
 	
 	Edits or displays the list of oper news messages.  When a
 	user opers up (with the /OPER command), these messages will
-	be sent to them.  (However, no more than %s messages will
+	be sent to them.  (However, no more than %d messages will
 	be sent in order to avoid flooding the user.  If there are
 	more news messages, only the most recent will be sent.)
 	NewsCount can be configured in services.conf.
diff --git a/lang/it.l b/lang/it.l
index b73695eea..1221035ab 100644
--- a/lang/it.l
+++ b/lang/it.l
@@ -3308,7 +3308,7 @@ NEWS_HELP_LOGON
 	
 	Edits or displays the list of logon news messages.  When a
 	user connects to the network, these messages will be sent
-	to them.  (However, no more than %s messages will be
+	to them.  (However, no more than %d messages will be
 	sent in order to avoid flooding the user.  If there are
 	more news messages, only the most recent will be sent.)
 	NewsCount can be configured in services.conf.
@@ -3322,7 +3322,7 @@ NEWS_HELP_OPER
 	
 	Edits or displays the list of oper news messages.  When a
 	user opers up (with the /OPER command), these messages will
-	be sent to them.  (However, no more than %s messages will
+	be sent to them.  (However, no more than %d messages will
 	be sent in order to avoid flooding the user.  If there are
 	more news messages, only the most recent will be sent.)
 	NewsCount can be configured in services.conf.
diff --git a/lang/ja_utf8.l b/lang/ja_utf8.l
index 3f3d7944b..e18d7020c 100644
--- a/lang/ja_utf8.l
+++ b/lang/ja_utf8.l
@@ -3286,7 +3286,7 @@ NEWS_HELP_LOGON
 	ãƒ­ã‚°ã‚ªãƒ³ãƒ‹ãƒ¥ãƒ¼ã‚¹ã‚’ç·¨é›†ã�¾ã�Ÿã�¯è¡¨ç¤ºã�™ã‚‹ã€‚ãƒ¦ãƒ¼ã‚¶ã�Œãƒ�ãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã�«
 	æŽ¥ç¶šã�—ã�Ÿã�¨ã��ã�«ã€�ã�“ã‚Œã‚‰ã�®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã�Œãƒ¦ãƒ¼ã‚¶ã�«é€�ä¿¡ã�•ã‚Œã‚‹
 	(ã�Ÿã� ã�—ã€�ãƒ¦ãƒ¼ã‚¶ã�«ã�“ã‚Œã‚’ flood æ”»æ’ƒã�¨å‹˜é�•ã�„ã�•ã�›ã�ªã�„ã�Ÿã‚�ã�«ã€�
-	%s å€‹ä»¥ä¸Šã�®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã�¯é€�ä¿¡ã�•ã‚Œã�ªã�„ã€‚ã�“ã�®å ´å�ˆã€�
+	%d å€‹ä»¥ä¸Šã�®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã�¯é€�ä¿¡ã�•ã‚Œã�ªã�„ã€‚ã�“ã�®å ´å�ˆã€�
 	ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã�¯æ–°ã�—ã�„ã‚‚ã�®ã�‹ã‚‰é †ã�«é€�ä¿¡ã�•ã‚Œã‚‹)ã€‚
 	NewsCount ã�¯ services.conf å†…ã�§è¨­å®šã�™ã‚‹ã€‚
 	
@@ -3300,7 +3300,7 @@ NEWS_HELP_OPER
 	ã‚µãƒ¼ãƒ�ã‚ªãƒšãƒ¬ãƒ¼ã‚¿ãƒ‹ãƒ¥ãƒ¼ã‚¹ã‚’ç·¨é›†ã�¾ã�Ÿã�¯è¡¨ç¤ºã�™ã‚‹ã€‚ãƒ¦ãƒ¼ã‚¶ã�Œ
 	ã‚µãƒ¼ãƒ�ã‚ªãƒšãƒ¬ãƒ¼ã‚¿ã�«ã�ªã‚‹ (/OPER ã‚³ãƒžãƒ³ãƒ‰ã�§) ã�¨ã€�ã�“ã‚Œã‚‰ã�®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸
 	ã�Œãƒ¦ãƒ¼ã‚¶ã�«é€�ä¿¡ã�•ã‚Œã‚‹ã€‚(ã�Ÿã� ã�—ã€�ãƒ¦ãƒ¼ã‚¶ã�«ã�“ã‚Œã‚’ flood æ”»æ’ƒã�¨å‹˜é�•ã�„
-	ã�•ã�›ã�ªã�„ã�Ÿã‚�ã�«ã€�%s å€‹ä»¥ä¸Šã�®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã�¯é€�ä¿¡ã�•ã‚Œã�ªã�„ã€‚
+	ã�•ã�›ã�ªã�„ã�Ÿã‚�ã�«ã€�%d å€‹ä»¥ä¸Šã�®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã�¯é€�ä¿¡ã�•ã‚Œã�ªã�„ã€‚
 	ã�“ã�®å ´å�ˆã€�ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã�¯æ–°ã�—ã�„ã‚‚ã�®ã�‹ã‚‰é †ã�«é€�ä¿¡ã�•ã‚Œã‚‹)ã€‚
 	NewsCount ã�¯ services.conf å†…ã�§è¨­å®šã�™ã‚‹ã€‚
 	
diff --git a/lang/nl.l b/lang/nl.l
index c33f2b64e..a5f860c7e 100644
--- a/lang/nl.l
+++ b/lang/nl.l
@@ -3376,7 +3376,7 @@ NEWS_HELP_LOGON
 	Wijzigt de lijst met login nieuwsberichten of geeft deze weer.
 	Wanneer een gebruiker met het netwerk verbindt, worden deze
 	berichten naar hem/haar verzonden.  (Echter, er zullen nooit
-	meer dan %s berichten worden verstuurd om het flooden van de
+	meer dan %d berichten worden verstuurd om het flooden van de
 	gebruiker te voorkomen. Als er meer nieuwsberichten
 	zijn worden alleen de meest recente vestuurd.)
 	NewsCount kan geconfigureerd worden in services.conf.
@@ -3391,7 +3391,7 @@ NEWS_HELP_OPER
 	Wijzigt de lijst met oper nieuwsberichten of geeft deze weer.
 	Wanneer een gebruiker opert (dmv het /OPER commando), worden
 	deze berichtennaar hem/haar verzonden.  (Echter, er zullen
-	nooit meer dan %s berichten worden verstuurd om het flooden
+	nooit meer dan %d berichten worden verstuurd om het flooden
 	van de gebruiker te voorkomen. Als er meer nieuwsberichten 
 	zijn worden alleen de meest recente vestuurd.)
 	NewsCount kan geconfigureerd worden in services.conf.
diff --git a/lang/pl.l b/lang/pl.l
index 145a700e5..7edfb3831 100644
--- a/lang/pl.l
+++ b/lang/pl.l
@@ -4392,7 +4392,7 @@ NEWS_HELP_LOGON
 	
 	Edytuje lub wy¶wietla listê wiadomo¶ci wysy³anych po
 	przy³±czeniu u¿ytkownika do sieci. Je¶li zdefniowanych
-	wiadomo¶ci jest wiêcej tylko najnowsze %s zostanie
+	wiadomo¶ci jest wiêcej tylko najnowsze %d zostanie
 	wys³anych (aby zapobiec floodowaniu). Warto¶æ NewsCount
 	mo¿e zostaæ zmieniona w pliku konfiguracyjym serwisów.
 	
@@ -4405,7 +4405,7 @@ NEWS_HELP_OPER
 	
 	Edytuje lub wy¶wietla listê wiadomo¶ci wysy³anych po
 	wykonaniu polecenia /OPER. Je¶li zdefiniowanych
-	wiadomo¶ci jest wiêcej tylko najnowsze %s zostanie
+	wiadomo¶ci jest wiêcej tylko najnowsze %d zostanie
 	wys³anych (aby zapobiec floodowaniu). Warto¶æ NewsCount
 	mo¿e zostaæ zmieniona w pliku konfiguracyjym serwisów.
 	
diff --git a/lang/pt.l b/lang/pt.l
index 3fe287556..fd24698fd 100644
--- a/lang/pt.l
+++ b/lang/pt.l
@@ -3325,7 +3325,7 @@ NEWS_HELP_LOGON
 	
 	Edits or displays the list of logon news messages.  When a
 	user connects to the network, these messages will be sent
-	to them.  (However, no more than %s messages will be
+	to them.  (However, no more than %d messages will be
 	sent in order to avoid flooding the user.  If there are
 	more news messages, only the most recent will be sent.)
 	NewsCount can be configured in services.conf.
@@ -3339,7 +3339,7 @@ NEWS_HELP_OPER
 	
 	Edits or displays the list of oper news messages.  When a
 	user opers up (with the /OPER command), these messages will
-	be sent to them.  (However, no more than %s messages will
+	be sent to them.  (However, no more than %d messages will
 	be sent in order to avoid flooding the user.  If there are
 	more news messages, only the most recent will be sent.)
 	NewsCount can be configured in services.conf.
diff --git a/lang/ru.l b/lang/ru.l
index 0377d836f..aa5a5847c 100644
--- a/lang/ru.l
+++ b/lang/ru.l
@@ -3299,7 +3299,7 @@ NEWS_HELP_LOGON
 	Ïîçâîëÿåò  óïðàâëÿòü ñïèñêîì íîâîñòåé,  êîòîðûå áóäóò àâòîìàòè÷åñêè
 	âûäàâàòüñÿ ïîëüçîâàòåëþ  ñðàçó æå, êàê òîëüêî îí ïîäêëþ÷èòñÿ ê ñåòè.
 	Ñòîèò çàìåòèòü, ÷òî âî èçáåæàíèå  ôëóäà ïîëüçîâàòåëü ïîëó÷èò òîëüêî
-	%s íîâîñòü(è), òàê ÷òî åñëè ó  âàñ â ñïèñêå èõ  áîëüøå - ïîêàçàíû
+	%d íîâîñòü(è), òàê ÷òî åñëè ó  âàñ â ñïèñêå èõ  áîëüøå - ïîêàçàíû
 	áóäóò òîëüêî  ïîñëåäíèå èç íèõ. Çíà÷åíèå  NewsCount,  îòâå÷àþùåå çà
 	îäíîâðåìåííî ïîñûëàåìîå êîë-âî íîâîñòåé, óêàçûâàåòñÿ â services.conf
 	
@@ -3320,7 +3320,7 @@ NEWS_HELP_OPER
 	ïîëüçîâàòåëü ïîëó÷èò ñòàòóñ IRC-îïåðàòîðà (èñïîëüçîâàâ êîìàíäó /OPER),
 	äàííûå ñîîáùåíèÿ áóäóò åìó îòïðàâëåíû àâòîìàòè÷åñêè.
 	Ñòîèò çàìåòèòü, ÷òî âî èçáåæàíèå  ôëóäà ïîëüçîâàòåëü ïîëó÷èò òîëüêî
-	%s íîâîñòü(è), òàê ÷òî åñëè ó  âàñ â ñïèñêå èõ  áîëüøå - ïîêàçàíû
+	%d íîâîñòü(è), òàê ÷òî åñëè ó  âàñ â ñïèñêå èõ  áîëüøå - ïîêàçàíû
 	áóäóò òîëüêî  ïîñëåäíèå èç íèõ. Çíà÷åíèå  NewsCount,  îòâå÷àþùåå çà
 	îäíîâðåìåííî ïîñûëàåìîå êîë-âî íîâîñòåé, óêàçûâàåòñÿ â services.conf
 	
diff --git a/lang/tr.l b/lang/tr.l
index 102ec2167..422d83341 100644
--- a/lang/tr.l
+++ b/lang/tr.l
@@ -3418,7 +3418,7 @@ NEWS_HELP_LOGON
 	
 	Giriþ haberleri ve mesajlarýný düzenlemek icin kullanýlýr. 
 	Kullanýcý sunucuya baðlantýðý anda bu belirtilen mesajlar giris yapan kullanýcýya 
-	iletilir.  (Bununla beraber, %s adetten fazla mesaj kullanýcýya
+	iletilir.  (Bununla beraber, %d adetten fazla mesaj kullanýcýya
 	gonderilmez.  Eðer cok fazla mesaj eklenmiþ bulunuyor ise
 	bunlardan en yenileri kullanýcýya ulaþtýrýlýr.)
 	NewsCount(Giriþ haberleri) Özellikleri services.conf'ta belirtilmiþtir ve bu dosyadan ayarlanabilir.
@@ -3432,7 +3432,7 @@ NEWS_HELP_OPER
 	
 	Giriþ haberleri ve mesajlarýný düzenlemek icin kullanýlýr(Yönetici giriþleri). 
 	Kullanýcý sunucu içerisinde yönetici konumuna gectiði anda bu belirtilen mesajlar giris yapan operatore 
-	iletilir.  (Bununla beraber, %s adetten fazla mesaj yöneticiye
+	iletilir.  (Bununla beraber, %d adetten fazla mesaj yöneticiye
 	gonderilmez.  Eðer cok fazla mesaj eklenmiþ bulunuyor ise
 	bunlardan en yenileri kullanýcýya ulaþtýrýlýr.)
 	NewsCount(Giriþ haberleri) Özellikleri services.conf'ta belirtilmiþtir ve bu dosyadan ayarlanabilir.
diff --git a/src/channels.c b/src/channels.c
index a42aa2ec4..2318d7ef2 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -1741,6 +1741,7 @@ void chan_delete(Channel * c)
         while (c->bans->entries) {
             entry_delete(c->bans, c->bans->entries);
         }
+        free(c->bans);
     }
 
     if (ircd->except) {
@@ -1748,6 +1749,7 @@ void chan_delete(Channel * c)
             while (c->excepts->entries) {
                 entry_delete(c->excepts, c->excepts->entries);
             }
+            free(c->excepts);
         }
     }
 
@@ -1756,6 +1758,7 @@ void chan_delete(Channel * c)
             while (c->invites->entries) {
                 entry_delete(c->invites, c->invites->entries);
             }
+            free(c->invites);
         }
     }
 
@@ -1784,6 +1787,10 @@ void del_ban(Channel * chan, char *mask)
 
     if (ban) {
         entry_delete(chan->bans, ban);
+        if (chan->bans->count == 0) {
+            free(chan->bans);
+            chan->bans = NULL;
+        }
 
         if (debug)
             alog("debug: Deleted ban %s from channel %s", mask,
@@ -1808,6 +1815,10 @@ void del_exception(Channel * chan, char *mask)
 
     if (exception) {
         entry_delete(chan->excepts, exception);
+        if (chan->excepts->count == 0) {
+            free(chan->excepts);
+            chan->excepts = NULL;
+        }
 
         if (debug)
             alog("debug: Deleted except %s to channel %s", mask,
@@ -1830,6 +1841,10 @@ void del_invite(Channel * chan, char *mask)
 
     if (invite) {
         entry_delete(chan->invites, invite);
+        if(chan->invites->count == 0) {
+            free(chan->invites);
+            chan->invites = NULL;
+        }
 
         if (debug)
             alog("debug: Deleted invite %s to channel %s", mask,
diff --git a/src/config.c b/src/config.c
index 7e56996b4..bb43e7d81 100644
--- a/src/config.c
+++ b/src/config.c
@@ -220,7 +220,7 @@ char *GlobalOnCycleMessage;
 char *GlobalOnCycleUP;
 char *ServicesRoot;
 char **ServicesRoots;
-int RootNumber;
+int RootNumber = 0;
 int SuperAdmin;
 int LogBot;
 int LogMaxUsers;
@@ -272,8 +272,8 @@ int OSOpersOnly;
 char *Modules;
 char *ModulesDelayed;
 char **ModulesAutoload;
-int ModulesNumber;
-int ModulesDelayedNumber;
+int ModulesNumber = 0;
+int ModulesDelayedNumber = 0;
 char **ModulesDelayedAutoload;
 
 /**
@@ -281,31 +281,31 @@ char **ModulesDelayedAutoload;
  **/
 char *HostCoreModules;
 char **HostServCoreModules;
-int HostServCoreNumber;
+int HostServCoreNumber = 0;
 
 char *MemoCoreModules;
 char **MemoServCoreModules;
-int MemoServCoreNumber;
+int MemoServCoreNumber = 0;
 
 char *HelpCoreModules;
 char **HelpServCoreModules;
-int HelpServCoreNumber;
+int HelpServCoreNumber = 0;
 
 char *BotCoreModules;
 char **BotServCoreModules;
-int BotServCoreNumber;
+int BotServCoreNumber = 0;
 
 char *OperCoreModules;
 char **OperServCoreModules;
-int OperServCoreNumber;
+int OperServCoreNumber = 0;
 
 char *NickCoreModules;
 char **NickServCoreModules;
-int NickServCoreNumber;
+int NickServCoreNumber = 0;
 
 char *ChanCoreModules;
 char **ChanServCoreModules;
-int ChanServCoreNumber;
+int ChanServCoreNumber = 0;
 
 
 char *MysqlHost;
@@ -346,7 +346,7 @@ int UnRestrictSAdmin;
 
 char *UlineServers;
 char **Ulines;
-int NumUlines;
+int NumUlines = 0;
 
 int UseTS6;
 
@@ -774,8 +774,7 @@ int parse_directive(Directive * d, char *dir, int ac, char *av[MAXPARAMS],
             *(int *) d->params[i].ptr = val;
             break;
         case PARAM_STRING:
-/*	      if (reload && *(char **)d->params[i].ptr)
-	      	free(*(char **)d->params[i].ptr); */
+            Anope_Free(*(char **)d->params[i].ptr);
             *(char **) d->params[i].ptr = sstrdup(av[optind++]);
             if (!d->params[i].ptr) {
                 error(linenum, "%s: Out of memory", d->name);
@@ -1247,7 +1246,8 @@ int read_config(int reload)
     /* Services Root building */
 
     if (ServicesRoot && !reload) {      /* Check to prevent segmentation fault if it's missing */
-        RootNumber = 0;
+        while( RootNumber )
+            free(ServicesRoots[--RootNumber]);
 
         s = strtok(ServicesRoot, " ");
         do {
@@ -1268,7 +1268,8 @@ int read_config(int reload)
     /* Ulines */
 
     if (UlineServers) {
-        NumUlines = 0;
+        while( NumUlines )
+            free(Ulines[--NumUlines]);
 
         s = strtok(UlineServers, " ");
         do {
@@ -1281,30 +1282,56 @@ int read_config(int reload)
     }
 
     /* Host Setters building... :P */
+    while( HostNumber )
+        free(HostSetters[--HostNumber]);
+    Anope_Free(HostSetters);
     HostSetters = buildStringList(HostSetter, &HostNumber);
 
     /* Modules Autoload building... :P */
+    while( ModulesNumber )
+        free(ModulesAutoload[--ModulesNumber]);
+    Anope_Free(ModulesAutoload);
     ModulesAutoload = buildStringList(Modules, &ModulesNumber);
-    ModulesDelayedAutoload =
-        buildStringList(ModulesDelayed, &ModulesDelayedNumber);
-    HostServCoreModules =
-        buildStringList(HostCoreModules, &HostServCoreNumber);
-    MemoServCoreModules =
-        buildStringList(MemoCoreModules, &MemoServCoreNumber);
-    HelpServCoreModules =
-        buildStringList(HelpCoreModules, &HelpServCoreNumber);
 
-    BotServCoreModules =
-        buildStringList(BotCoreModules, &BotServCoreNumber);
+    while( ModulesDelayedNumber )
+        free(ModulesDelayedAutoload[--ModulesDelayedNumber]);
+    Anope_Free(ModulesDelayedAutoload);
+    ModulesDelayedAutoload = buildStringList(ModulesDelayed, &ModulesDelayedNumber);
 
-    OperServCoreModules =
-        buildStringList(OperCoreModules, &OperServCoreNumber);
+    while( HostServCoreNumber )
+        free(HostServCoreModules[--HostServCoreNumber]);
+    Anope_Free(HostServCoreModules);
+    HostServCoreModules = buildStringList(HostCoreModules, &HostServCoreNumber);
 
-    ChanServCoreModules =
-        buildStringList(ChanCoreModules, &ChanServCoreNumber);
+    while( MemoServCoreNumber )
+        free(MemoServCoreModules[--MemoServCoreNumber]);
+    Anope_Free(MemoServCoreModules);
+    MemoServCoreModules = buildStringList(MemoCoreModules, &MemoServCoreNumber);
 
-    NickServCoreModules =
-        buildStringList(NickCoreModules, &NickServCoreNumber);
+    while( HelpServCoreNumber )
+        free(HelpServCoreModules[--HelpServCoreNumber]);
+    Anope_Free(HelpServCoreModules);
+    HelpServCoreModules = buildStringList(HelpCoreModules, &HelpServCoreNumber);
+
+    while( BotServCoreNumber )
+        free(BotServCoreModules[--BotServCoreNumber]);
+    Anope_Free(BotServCoreModules);
+    BotServCoreModules = buildStringList(BotCoreModules, &BotServCoreNumber);
+
+    while( OperServCoreNumber )
+        free(OperServCoreModules[--OperServCoreNumber]);
+    Anope_Free(OperServCoreModules);
+    OperServCoreModules = buildStringList(OperCoreModules, &OperServCoreNumber);
+
+    while( ChanServCoreNumber )
+        free(ChanServCoreModules[--ChanServCoreNumber]);
+    Anope_Free(ChanServCoreModules);
+    ChanServCoreModules = buildStringList(ChanCoreModules, &ChanServCoreNumber);
+
+    while( NickServCoreNumber )
+        free(NickServCoreModules[--NickServCoreNumber]);
+    Anope_Free(NickServCoreModules);
+    NickServCoreModules = buildStringList(NickCoreModules, &NickServCoreNumber);
 
 
     if (LimitSessions) {
@@ -1413,6 +1440,7 @@ int read_config(int reload)
         CHECK(UseMail);
         CHECK(NSForceEmail);
     } else {
+        Anope_Free(PreNickDBName);
         PreNickDBName = NULL;
         NSRExpire = 0;
     }
diff --git a/src/core/cs_set.c b/src/core/cs_set.c
index 7138a2054..f82a74c78 100644
--- a/src/core/cs_set.c
+++ b/src/core/cs_set.c
@@ -37,6 +37,7 @@ static int do_set_opnotice(User * u, ChannelInfo * ci, char *param);
 static int do_set_xop(User * u, ChannelInfo * ci, char *param);
 static int do_set_peace(User * u, ChannelInfo * ci, char *param);
 static int do_set_noexpire(User * u, ChannelInfo * ci, char *param);
+static int reload_config(int argc, char **argv);
 static void myChanServHelp(User * u);
 
 /**
@@ -48,6 +49,7 @@ static void myChanServHelp(User * u);
 int AnopeInit(int argc, char **argv)
 {
     Command *c;
+    EvtHook *hook;
 
     moduleAddAuthor("Anope");
     moduleAddVersion(VERSION_STRING);
@@ -125,6 +127,12 @@ int AnopeInit(int argc, char **argv)
 
     moduleSetChanHelp(myChanServHelp);
 
+    hook = createEventHook(EVENT_RELOAD, reload_config);
+    if (moduleAddEventHook(hook) != MOD_ERR_OK) {
+        alog("[\002cs_set\002] Can't hook to EVENT_RELOAD event");
+        return MOD_STOP;
+    }
+
     return MOD_CONT;
 }
 
@@ -898,3 +906,18 @@ static int do_set_noexpire(User * u, ChannelInfo * ci, char *param)
     }
     return MOD_CONT;
 }
+
+/*************************************************************************/
+
+/**
+ * Upon /os reload refresh the limit in help output
+ **/
+static int reload_config(int argc, char **argv) {
+    Command *c;
+
+    if (argc >= 1 && !stricmp(argv[0], EVENT_START))
+        if ((c = findCommand(CHANSERV, "SET SUCCESSOR")))
+            c->help_param1 = (char *) (long) CSMaxReg;
+
+    return MOD_CONT;
+}
diff --git a/src/core/ms_set.c b/src/core/ms_set.c
index 6d625acb5..19f7de7ad 100644
--- a/src/core/ms_set.c
+++ b/src/core/ms_set.c
@@ -17,6 +17,7 @@
 static int do_set(User * u);
 static int do_set_notify(User * u, MemoInfo * mi, char *param);
 static int do_set_limit(User * u, MemoInfo * mi, char *param);
+static int reload_config(int argc, char **argv);
 static void myMemoServHelp(User * u);
 
 /**
@@ -28,6 +29,7 @@ static void myMemoServHelp(User * u);
 int AnopeInit(int argc, char **argv)
 {
     Command *c;
+    EvtHook *hook;
 
     moduleAddAuthor("Anope");
     moduleAddVersion(VERSION_STRING);
@@ -49,6 +51,12 @@ int AnopeInit(int argc, char **argv)
 
     moduleSetMemoHelp(myMemoServHelp);
 
+    hook = createEventHook(EVENT_RELOAD, reload_config);
+    if (moduleAddEventHook(hook) != MOD_ERR_OK) {
+        alog("[\002ms_set\002] Can't hook to EVENT_RELOAD event");
+        return MOD_STOP;
+    }
+
     return MOD_CONT;
 }
 
@@ -293,3 +301,16 @@ static int do_set_limit(User * u, MemoInfo * mi, char *param)
     }
     return MOD_CONT;
 }
+
+/**
+ * Upon /os reload refresh the limit in help output
+ **/
+static int reload_config(int argc, char **argv) {
+    Command *c;
+
+    if (argc >= 1 && !stricmp(argv[0], EVENT_START))
+        if ((c = findCommand(MEMOSERV, "SET LIMIT")))
+            c->help_param1 = (char *) (long) MSMaxMemos;
+
+    return MOD_CONT;
+}
diff --git a/src/core/os_logonnews.c b/src/core/os_logonnews.c
index cb01fcfff..78353be47 100644
--- a/src/core/os_logonnews.c
+++ b/src/core/os_logonnews.c
@@ -27,7 +27,6 @@ int AnopeInit(int argc, char **argv)
 {
     Command *c;
     EvtHook *hook;
-    char buf[BUFSIZE];
 
     moduleAddAuthor("Anope");
     moduleAddVersion(VERSION_STRING);
@@ -39,8 +38,7 @@ int AnopeInit(int argc, char **argv)
      **/
     c = createCommand("LOGONNEWS", do_logonnews, is_services_admin,
                       NEWS_HELP_LOGON, -1, -1, -1, -1);
-    snprintf(buf, BUFSIZE, "%d", NewsCount),
-    c->help_param1 = sstrdup(buf);
+    c->help_param1 = (char *) (long) NewsCount;
     moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
 
     moduleSetOperHelp(myOperServHelp);
@@ -59,12 +57,6 @@ int AnopeInit(int argc, char **argv)
  **/
 void AnopeFini(void)
 {
-    Command *c = findCommand(OPERSERV, "LOGONNEWS");
-    if (c && c->help_param1)
-    {
-        free(c->help_param1);
-        c->help_param1 = NULL;
-    }
 }
 
 
@@ -84,18 +76,11 @@ static void myOperServHelp(User * u)
  * Upon /os reload refresh the count
  **/
 static int reload_config(int argc, char **argv) {
-    char buf[BUFSIZE];
     Command *c;
 
-    if (argc >= 1) {
-        if (!stricmp(argv[0], EVENT_START)) {
-            if ((c = findCommand(OPERSERV, "LOGONNEWS"))) {
-                free(c->help_param1);
-                snprintf(buf, BUFSIZE, "%d", NewsCount),
-                c->help_param1 = sstrdup(buf);
-            }
-        }
-    }
+    if (argc >= 1 && !stricmp(argv[0], EVENT_START))
+        if ((c = findCommand(OPERSERV, "LOGONNEWS")))
+            c->help_param1 = (char *) (long) NewsCount;
 
     return MOD_CONT;
 }
diff --git a/src/core/os_opernews.c b/src/core/os_opernews.c
index 5748f8904..773d1b3f6 100644
--- a/src/core/os_opernews.c
+++ b/src/core/os_opernews.c
@@ -27,7 +27,6 @@ int AnopeInit(int argc, char **argv)
 {
     Command *c;
     EvtHook *hook;
-    char buf[BUFSIZE];
 
     moduleAddAuthor("Anope");
     moduleAddVersion(VERSION_STRING);
@@ -39,8 +38,7 @@ int AnopeInit(int argc, char **argv)
      **/
     c = createCommand("OPERNEWS", do_opernews, is_services_admin,
                       NEWS_HELP_OPER, -1, -1, -1, -1);
-    snprintf(buf, BUFSIZE, "%d", NewsCount),
-    c->help_param1 = sstrdup(buf);
+    c->help_param1 = (char *) (long) NewsCount;
     moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
 
     moduleSetOperHelp(myOperServHelp);
@@ -59,13 +57,6 @@ int AnopeInit(int argc, char **argv)
  **/
 void AnopeFini(void)
 {
-    Command *c = findCommand(OPERSERV, "OPERNEWS");
-
-    if (c && c->help_param1)
-    {
-        free(c->help_param1);
-        c->help_param1 = NULL;
-    }
 }
 
 
@@ -84,18 +75,11 @@ static void myOperServHelp(User * u)
  * Upon /os reload refresh the count
  **/
 static int reload_config(int argc, char **argv) {
-    char buf[BUFSIZE];
     Command *c;
 
-    if (argc >= 1) {
-        if (!stricmp(argv[0], EVENT_START)) {
-            if ((c = findCommand(OPERSERV, "OPERNEWS"))) {
-                free(c->help_param1);
-                snprintf(buf, BUFSIZE, "%d", NewsCount),
-                c->help_param1 = sstrdup(buf);
-            }
-        }
-    }
+    if (argc >= 1 && !stricmp(argv[0], EVENT_START))
+        if ((c = findCommand(OPERSERV, "OPERNEWS")))
+            c->help_param1 = (char *) (long) NewsCount;
 
     return MOD_CONT;
 }
diff --git a/src/events.c b/src/events.c
index 2e9f02904..4a4c0f7c1 100644
--- a/src/events.c
+++ b/src/events.c
@@ -571,6 +571,7 @@ int moduleEventDelHandler(char *name)
     if (debug) {
         displayEvtMessageFromHash(evm->name);
     }
+    destroyEventHandler(evm);
     return status;
 }
 
@@ -596,6 +597,7 @@ int moduleEventDelHook(const char *name)
     if (debug) {
         displayHookFromHash(evh->name);
     }
+    destroyEventHook(evh);
     return status;
 }
 
@@ -641,6 +643,7 @@ int delEventHandler(EvtMessageHash * msgEvtTable[], EvtMessage * evm,
                 } else {
                     msgEvtTable[index] = current->next;
                     free(current->name);
+                    free(current);
                     return MOD_ERR_OK;
                 }
             } else {
@@ -662,6 +665,7 @@ int delEventHandler(EvtMessageHash * msgEvtTable[], EvtMessage * evm,
                 } else {
                     lastHash->next = current->next;
                     free(current->name);
+                    free(current);
                     return MOD_ERR_OK;
                 }
             }
@@ -714,6 +718,7 @@ int delEventHook(EvtHookHash * hookEvtTable[], EvtHook * evh,
                 } else {
                     hookEvtTable[index] = current->next;
                     free(current->name);
+                    free(current);
                     return MOD_ERR_OK;
                 }
             } else {
@@ -735,6 +740,7 @@ int delEventHook(EvtHookHash * hookEvtTable[], EvtHook * evh,
                 } else {
                     lastHash->next = current->next;
                     free(current->name);
+                    free(current);
                     return MOD_ERR_OK;
                 }
             }
@@ -763,6 +769,7 @@ int destroyEventHandler(EvtMessage * evm)
         free(evm->mod_name);
     }
     evm->next = NULL;
+    free(evm);
     return MOD_ERR_OK;
 }
 
@@ -784,5 +791,6 @@ int destroyEventHook(EvtHook * evh)
         free(evh->mod_name);
     }
     evh->next = NULL;
+    free(evh);
     return MOD_ERR_OK;
 }
diff --git a/src/memoserv.c b/src/memoserv.c
index 0bb7f6a8e..3859862c1 100644
--- a/src/memoserv.c
+++ b/src/memoserv.c
@@ -275,6 +275,7 @@ void memo_send_from(User * u, char *name, char *text, int z, char *source)
         mi->memocount++;
         mi->memos = srealloc(mi->memos, sizeof(Memo) * mi->memocount);
         m = &mi->memos[mi->memocount - 1];
+        memset(m->sender, '\0', sizeof(m->sender));
         strscpy(m->sender, source, NICKMAX);
         m->moduleData = NULL;
         if (mi->memocount > 1) {
diff --git a/src/modules.c b/src/modules.c
index 9962a16fb..f1fcb39d1 100644
--- a/src/modules.c
+++ b/src/modules.c
@@ -347,6 +347,7 @@ Module *createModule(char *filename)
 
     m->type = THIRD;
     for (i = 0; i < NUM_LANGS; i++) {
+        m->lang[i].argv = NULL;
         m->lang[i].argc = 0;
     }
     return m;                   /* return a nice new module */
@@ -829,15 +830,15 @@ void moduleSetType(MODType type)
 int prepForUnload(Module * m)
 {
     int idx;
-    CommandHash *current = NULL;
-    MessageHash *mcurrent = NULL;
-    EvtMessageHash *ecurrent = NULL;
-    EvtHookHash *ehcurrent = NULL;
+    CommandHash *current = NULL, *current_next = NULL;
+    MessageHash *mcurrent = NULL, *mcurrent_next = NULL;
+    EvtMessageHash *ecurrent = NULL, *ecurrent_next = NULL;
+    EvtHookHash *ehcurrent = NULL, *ehcurrent_next = NULL;
 
-    Command *c;
-    Message *msg;
-    EvtMessage *eMsg;
-    EvtHook *eHook;
+    Command *c, *c_next;
+    Message *msg, *msg_next;
+    EvtMessage *eMsg, *eMsg_next;
+    EvtHook *eHook, *eHook_next;
 
     if (!m) {
         return MOD_ERR_PARAMS;
@@ -853,85 +854,113 @@ int prepForUnload(Module * m)
      * ok, im going to walk every hash looking for commands we own, now, not exactly elegant or efficiant :)
      **/
     for (idx = 0; idx < MAX_CMD_HASH; idx++) {
-        for (current = HS_cmdTable[idx]; current; current = current->next) {
-            for (c = current->c; c; c = c->next) {
+        for (current = HS_cmdTable[idx]; current; current = current_next) {
+            current_next = current->next;
+            for (c = current->c; c; c = c_next) {
+                c_next = c->next; 
                 if ((c->mod_name) && (strcmp(c->mod_name, m->name) == 0)) {
-                    moduleDelCommand(HOSTSERV, c->name);
+                    delCommand(HOSTSERV, c, m->name);
+                    destroyCommand(c);
                 }
             }
         }
 
-        for (current = BS_cmdTable[idx]; current; current = current->next) {
-            for (c = current->c; c; c = c->next) {
+        for (current = BS_cmdTable[idx]; current; current = current_next) {
+            current_next = current->next;
+            for (c = current->c; c; c = c_next) {
+                c_next = c->next;
                 if ((c->mod_name) && (strcmp(c->mod_name, m->name) == 0)) {
-                    moduleDelCommand(BOTSERV, c->name);
+                    delCommand(BOTSERV, c, m->name);
+                    destroyCommand(c);
                 }
             }
         }
 
-        for (current = MS_cmdTable[idx]; current; current = current->next) {
-            for (c = current->c; c; c = c->next) {
+        for (current = MS_cmdTable[idx]; current; current = current_next) {
+            current_next = current->next;
+            for (c = current->c; c; c = c_next) {
+                c_next = c->next;
                 if ((c->mod_name) && (strcmp(c->mod_name, m->name) == 0)) {
-                    moduleDelCommand(MEMOSERV, c->name);
+                    delCommand(MEMOSERV, c, m->name);
+                    destroyCommand(c);
                 }
             }
         }
 
-        for (current = NS_cmdTable[idx]; current; current = current->next) {
-            for (c = current->c; c; c = c->next) {
+        for (current = NS_cmdTable[idx]; current; current = current_next) {
+            current_next = current->next;
+            for (c = current->c; c; c = c_next) {
+                c_next = c->next;
                 if ((c->mod_name) && (strcmp(c->mod_name, m->name) == 0)) {
-                    moduleDelCommand(NICKSERV, c->name);
+                    delCommand(NICKSERV, c, m->name);
+                    destroyCommand(c);
                 }
             }
         }
 
-        for (current = CS_cmdTable[idx]; current; current = current->next) {
-            for (c = current->c; c; c = c->next) {
+        for (current = CS_cmdTable[idx]; current; current = current_next) {
+            current_next = current->next;
+            for (c = current->c; c; c = c_next) {
+                c_next = c->next;
                 if ((c->mod_name) && (strcmp(c->mod_name, m->name) == 0)) {
-                    moduleDelCommand(CHANSERV, c->name);
+                    delCommand(CHANSERV, c, m->name);
+                    destroyCommand(c);
                 }
             }
         }
 
-        for (current = HE_cmdTable[idx]; current; current = current->next) {
-            for (c = current->c; c; c = c->next) {
+        for (current = HE_cmdTable[idx]; current; current = current_next) {
+            current_next = current->next;
+            for (c = current->c; c; c = c_next) {
+                c_next = c->next;
                 if ((c->mod_name) && (strcmp(c->mod_name, m->name) == 0)) {
-                    moduleDelCommand(HELPSERV, c->name);
+                    delCommand(HELPSERV, c, m->name);
+                    destroyCommand(c);
                 }
             }
         }
 
-        for (current = OS_cmdTable[idx]; current; current = current->next) {
-            for (c = current->c; c; c = c->next) {
+        for (current = OS_cmdTable[idx]; current; current = current_next) {
+            current_next = current->next;
+            for (c = current->c; c; c = c_next) {
+                c_next = c->next;
                 if ((c->mod_name) && (stricmp(c->mod_name, m->name) == 0)) {
-                    moduleDelCommand(OPERSERV, c->name);
+                    delCommand(OPERSERV, c, m->name);
+                    destroyCommand(c);
                 }
             }
         }
 
-        for (mcurrent = IRCD[idx]; mcurrent; mcurrent = mcurrent->next) {
-            for (msg = mcurrent->m; msg; msg = msg->next) {
-                if ((msg->mod_name)
-                    && (stricmp(msg->mod_name, m->name) == 0)) {
-                    moduleDelMessage(msg->name);
+        for (mcurrent = IRCD[idx]; mcurrent; mcurrent = mcurrent_next) {
+            mcurrent_next = mcurrent->next;
+            for (msg = mcurrent->m; msg; msg = msg_next) {
+                msg_next = msg->next;
+                if (msg->mod_name && (stricmp(msg->mod_name, m->name) == 0)) {
+                    delMessage(IRCD, msg, m->name);
+                    destroyMessage(msg);
                 }
             }
         }
 
-        for (ecurrent = EVENT[idx]; ecurrent; ecurrent = ecurrent->next) {
-            for (eMsg = ecurrent->evm; eMsg; eMsg = eMsg->next) {
+        for (ecurrent = EVENT[idx]; ecurrent; ecurrent = ecurrent_next) {
+            ecurrent_next = ecurrent->next;
+            for (eMsg = ecurrent->evm; eMsg; eMsg = eMsg_next) {
+                eMsg_next = eMsg->next;
                 if ((eMsg->mod_name)
                     && (stricmp(eMsg->mod_name, m->name) == 0)) {
                     delEventHandler(EVENT, eMsg, m->name);
+                    destroyEventHandler(eMsg);
                 }
             }
         }
-        for (ehcurrent = EVENTHOOKS[idx]; ehcurrent;
-             ehcurrent = ehcurrent->next) {
-            for (eHook = ehcurrent->evh; eHook; eHook = eHook->next) {
+        for (ehcurrent = EVENTHOOKS[idx]; ehcurrent; ehcurrent = ehcurrent_next) {
+            ehcurrent_next = ehcurrent->next;
+            for (eHook = ehcurrent->evh; eHook; eHook = eHook_next) {
+                eHook_next = eHook->next;
                 if ((eHook->mod_name)
                     && (stricmp(eHook->mod_name, m->name) == 0)) {
                     delEventHook(EVENTHOOKS, eHook, m->name);
+                    destroyEventHook(eHook);
                 }
             }
         }
@@ -1014,18 +1043,6 @@ int destroyCommand(Command * c)
     c->helpmsg_oper = -1;
     c->helpmsg_admin = -1;
     c->helpmsg_root = -1;
-    if (c->help_param1) {
-        free(c->help_param1);
-    }
-    if (c->help_param2) {
-        free(c->help_param2);
-    }
-    if (c->help_param3) {
-        free(c->help_param3);
-    }
-    if (c->help_param4) {
-        free(c->help_param4);
-    }
     if (c->mod_name) {
         free(c->mod_name);
     }
@@ -1144,7 +1161,7 @@ int moduleAddCommand(CommandHash * cmdTable[], Command * c, int pos)
 int moduleDelCommand(CommandHash * cmdTable[], char *name)
 {
     Command *c = NULL;
-    Command *cmd = NULL;
+    Command *cmd = NULL, *cmd_next = NULL;
     int status = 0;
 
     if (!mod_current_module) {
@@ -1157,7 +1174,8 @@ int moduleDelCommand(CommandHash * cmdTable[], char *name)
     }
 
 
-    for (cmd = c; cmd; cmd = cmd->next) {
+    for (cmd = c; cmd; cmd = cmd_next) {
+        cmd_next = cmd->next;
         if (cmd->mod_name
             && stricmp(cmd->mod_name, mod_current_module->name) == 0) {
             if (debug >= 2) {
@@ -1167,6 +1185,7 @@ int moduleDelCommand(CommandHash * cmdTable[], char *name)
             if (debug >= 2) {
                 displayCommandFromHash(cmdTable, name);
             }
+            destroyCommand(cmd);
         }
     }
     return status;
@@ -1379,6 +1398,7 @@ int delCommand(CommandHash * cmdTable[], Command * c, char *mod_name)
                 } else {
                     cmdTable[index] = current->next;
                     free(current->name);
+                    free(current);
                     send_event(EVENT_DELCOMMAND, 2, c->mod_name, c->name);
                     return MOD_ERR_OK;
                 }
@@ -1402,6 +1422,7 @@ int delCommand(CommandHash * cmdTable[], Command * c, char *mod_name)
                 } else {
                     lastHash->next = current->next;
                     free(current->name);
+                    free(current);
                     send_event(EVENT_DELCOMMAND, 2, c->mod_name, c->name);
                     return MOD_ERR_OK;
                 }
@@ -1633,6 +1654,7 @@ int moduleDelMessage(char *name)
     if (debug) {
         displayMessageFromHash(m->name);
     }
+    destroyMessage(m);
     return status;
 }
 
@@ -1677,6 +1699,7 @@ int delMessage(MessageHash * msgTable[], Message * m, char *mod_name)
                 } else {
                     msgTable[index] = current->next;
                     free(current->name);
+                    free(current);
                     return MOD_ERR_OK;
                 }
             } else {
@@ -1698,6 +1721,7 @@ int delMessage(MessageHash * msgTable[], Message * m, char *mod_name)
                 } else {
                     lastHash->next = current->next;
                     free(current->name);
+                    free(current);
                     return MOD_ERR_OK;
                 }
             }
@@ -1725,6 +1749,7 @@ int destroyMessage(Message * m)
         free(m->mod_name);
     }
     m->next = NULL;
+    free(m);
     return MOD_ERR_OK;
 }
 
@@ -1735,6 +1760,7 @@ int destroyMessage(Message * m)
 void moduleAddVersion(const char *version)
 {
     if (mod_current_module && version) {
+        Anope_Free(mod_current_module->version);
         mod_current_module->version = sstrdup(version);
     }
 }
@@ -1746,6 +1772,7 @@ void moduleAddVersion(const char *version)
 void moduleAddAuthor(const char *author)
 {
     if (mod_current_module && author) {
+        Anope_Free(mod_current_module->author);
         mod_current_module->author = sstrdup(author);
     }
 }
@@ -1859,6 +1886,7 @@ void moduleCallBackDeleteEntry(ModuleCallBack * prev)
     for (i = 0; i < tmp->argc; i++) {
         free(tmp->argv[i]);
     }
+    free(tmp->argv);
     tmp->argc = 0;
     tmp->next = NULL;
     free(tmp);
@@ -2597,13 +2625,10 @@ int moduleGetConfigDirective(Directive * d)
             }
             retval = parse_directive(d, directive, ac, av, linenum, 0, s);
         }
-        if (directive)
-            free(directive);
+        Anope_Free(directive);
+        Anope_Free(dir);
+        Anope_Free(str);
     }
-    if (dir)
-        free(dir);
-    if (str)
-       free(str);
     fclose(config);
     return retval;
 }
@@ -2733,9 +2758,11 @@ void moduleDeleteLanguage(int langNumber)
     if ((mod_current_module_name) && (!mod_current_module || strcmp(mod_current_module_name, mod_current_module->name))) {
         mod_current_module = findModule(mod_current_module_name);
     }
-    for (idx = 0; idx > mod_current_module->lang[langNumber].argc; idx++) {
+    for (idx = 0; idx < mod_current_module->lang[langNumber].argc; idx++) {
         free(mod_current_module->lang[langNumber].argv[idx]);
     }
+    Anope_Free(mod_current_module->lang[langNumber].argv);
+    mod_current_module->lang[langNumber].argv = NULL;
     mod_current_module->lang[langNumber].argc = 0;
 }
 
diff --git a/src/modules/cs_appendtopic.c b/src/modules/cs_appendtopic.c
index 433bc76fa..ea0de0529 100644
--- a/src/modules/cs_appendtopic.c
+++ b/src/modules/cs_appendtopic.c
@@ -158,6 +158,8 @@ static int my_cs_appendtopic(User * u)
             }
         }
     }
+    Anope_Free(chan);
+    Anope_Free(newtopic);
     return MOD_CONT;
 }
 
diff --git a/src/modules/hs_request.c b/src/modules/hs_request.c
index 47c3de46f..36f3b013d 100644
--- a/src/modules/hs_request.c
+++ b/src/modules/hs_request.c
@@ -719,13 +719,12 @@ static void my_load_config(void)
     for (i = 0; i < 4; i++)
         moduleGetConfigDirective(confvalues[i]);
 
-    if (tmp) {
-        if (HSRequestDBName)
-            free(HSRequestDBName);
+    Anope_Free(HSRequestDBName);
+    
+    if (tmp)
         HSRequestDBName = sstrdup(tmp);
-    } else {
+    else
         HSRequestDBName = sstrdup(HSREQ_DEFAULT_DBNAME);
-    }
 
     if (debug)
         alog("debug: [hs_request] Set config vars: MemoUser=%d MemoOper=%d MemoSetters=%d DBName='%s'", HSRequestMemoUser, HSRequestMemoOper, HSRequestMemoSetters, HSRequestDBName);
diff --git a/src/process.c b/src/process.c
index 22f88326d..e869c7243 100644
--- a/src/process.c
+++ b/src/process.c
@@ -78,6 +78,7 @@ void add_ignore(const char *nick, time_t delta)
         else if (ign->time < now + delta)
             ign->time = now + delta;
 
+        free(mask);
     /* Create new entry.. */ 
     } else {
         ign = scalloc(sizeof(*ign), 1);
diff --git a/src/slist.c b/src/slist.c
index ff465ceb0..0352ccfd2 100644
--- a/src/slist.c
+++ b/src/slist.c
@@ -322,8 +322,8 @@ int slist_indexof(SList * slist, void *item)
     if (slist->count == 0)
         return -1;
 
-    for (i = 0, entry = slist->list[0]; i < slist->count;
-         i++, entry = slist->list[i]) {
+    for (i = 0; i < slist->count; i++) {
+        entry = slist->list[i];
         if ((slist->opts
              && slist->opts->isequal) ? (slist->opts->isequal(slist, item,
                                                               entry))
