diff --git a/archival/dpkg.c b/archival/dpkg.c
index e192b4a..c096518 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -1,6 +1,6 @@
 /*
  *  Mini dpkg implementation for busybox.
- *  This is not meant as a replacemnt for dpkg
+ *  This is not meant as a replacement for dpkg
  *
  *  Written By Glenn McGrath with the help of others
  *  Copyright (C) 2001 by Glenn McGrath
@@ -23,7 +23,7 @@
  */
 
 /*
- * Known difference between busybox dpkg and the official dpkg that i dont
+ * Known difference between busybox dpkg and the official dpkg that i don't
  * consider important, its worth keeping a note of differences anyway, just to
  * make it easier to maintain.
  *  - The first value for the Confflile: field isnt placed on a new line.
@@ -86,7 +86,7 @@
 
 /* Currently it doesnt store packages that have state-status of not-installed
  * So it only really has to be the size of the maximum number of packages
- * likely to be installed at any one time, so there is a bit of leaway here */
+ * likely to be installed at any one time, so there is a bit of leeway here */
 #define STATUS_HASH_PRIME 8191
 typedef struct status_node_s {
 	unsigned int package:14;	/* has to fit PACKAGE_HASH_PRIME */
@@ -94,7 +94,7 @@
 } status_node_t;
 status_node_t *status_hashtable[STATUS_HASH_PRIME + 1];
 
-/* Even numbers are for 'extras', like ored dependecies or null */
+/* Even numbers are for 'extras', like ored dependencies or null */
 enum edge_type_e {
 	EDGE_NULL = 0,
 	EDGE_PRE_DEPENDS = 1,
@@ -148,7 +148,7 @@
 	for(i = 1; i < len; i++) {
 		/* shifts the ascii based value and adds it to previous value
 		 * shift amount is mod 24 because long int is 32 bit and data
-		 * to be shifted is 8, dont want to shift data to where it has
+		 * to be shifted is 8, don't want to shift data to where it has
 		 * no effect*/
 		hash_num += ((key[i] + key[i-1]) << ((key[i] * i) % 24));
 	}
@@ -392,7 +392,7 @@
 /*
  * This function searches through the entire package_hashtable looking
  * for a package which provides "needle". It returns the index into
- * the package_hashtable for the provining package.
+ * the package_hashtable for the providing package.
  *
  * needle is the index into name_hashtable of the package we are
  * looking for.
@@ -489,7 +489,7 @@
 				/* Skip leading ' ' or '(' */
 				version += strspn(field2, " ");
 				version += strspn(version, "(");
-				/* Calculate length of any operator charactors */
+				/* Calculate length of any operator characters */
 				offset_ch = strspn(version, "<=>");
 				/* Determine operator */
 				if (offset_ch > 0) {
@@ -636,7 +636,7 @@
 	for (i = 1; i < num; i++) {
 		/* skip past a word */
 		status_string += strcspn(status_string, " ");
-		/* skip past the seperating spaces */
+		/* skip past the separating spaces */
 		status_string += strspn(status_string, " ");
 	}
 	len = strcspn(status_string, " \n\0");
@@ -955,13 +955,13 @@
 	fclose(new_status_file);
 
 
-	/* Create a seperate backfile to dpkg */
+	/* Create a separate backfile to dpkg */
 	if (rename("/var/lib/dpkg/status", "/var/lib/dpkg/status.udeb.bak") == -1) {
 		struct stat stat_buf;
 		if (stat("/var/lib/dpkg/status", &stat_buf) == 0) {
 			bb_error_msg_and_die("Couldnt create backup status file");
 		}
-		/* Its ok if renaming the status file fails becasue status
+		/* Its ok if renaming the status file fails because status
 		 * file doesnt exist, maybe we are starting from scratch */
 		bb_error_msg("No status file found, creating new one");
 	}
@@ -971,10 +971,10 @@
 	}
 }
 
-/* This function returns TRUE if the given package can statisfy a
+/* This function returns TRUE if the given package can satisfy a
  * dependency of type depend_type.
  *
- * A pre-depends is statisfied only if a package is already installed,
+ * A pre-depends is satisfied only if a package is already installed,
  * which a regular depends can be satisfied by a package which we want
  * to install.
  */
@@ -1085,7 +1085,7 @@
 	for (i = 0; i < PACKAGE_HASH_PRIME; i++) {
 		int status_num = 0;
 		int number_of_alternatives = 0;
-		const edge_t * root_of_alternatives;
+		const edge_t * root_of_alternatives = NULL;
 		const common_node_t *package_node = package_hashtable[i];
 
 		/* If the package node does not exist then this
@@ -1118,7 +1118,7 @@
                         continue;
 #endif
 
-		/* This code is tested only for EDGE_DEPENDS, sine I
+		/* This code is tested only for EDGE_DEPENDS, since I
 		 * have no suitable pre-depends available. There is no
 		 * reason that it shouldn't work though :-)
 		 */
@@ -1211,7 +1211,7 @@
 	char *line = NULL;
 	int count = 0;
 
-	/* dont use [xw]fopen here, handle error ourself */
+	/* don't use [xw]fopen here, handle error ourself */
 	list_stream = fopen(filename, "r");
 	if (list_stream == NULL) {
 		return(NULL);
@@ -1385,7 +1385,7 @@
 		bb_error_msg_and_die("script failed, prerm failure");
 	}
 
-	/* Create a list of files to remove, and a seperate list of those to keep */
+	/* Create a list of files to remove, and a separate list of those to keep */
 	sprintf(list_name, "/var/lib/dpkg/info/%s.list", package_name);
 	remove_files = create_list(list_name);
 
@@ -1480,7 +1480,7 @@
 	tar_handle = init_handle();
 	tar_handle->src_fd = ar_handle->src_fd;
 
-	/* We dont care about data.tar.* or debian-binary, just control.tar.* */
+	/* We don't care about data.tar.* or debian-binary, just control.tar.* */
 #ifdef CONFIG_FEATURE_DEB_TAR_GZ
 	ar_handle->accept = llist_add_to(NULL, "control.tar.gz");
 #endif
@@ -1502,7 +1502,7 @@
 	tar_handle = init_handle();
 	tar_handle->src_fd = ar_handle->src_fd;
 
-	/* We dont care about control.tar.* or debian-binary, just data.tar.* */
+	/* We don't care about control.tar.* or debian-binary, just data.tar.* */
 #ifdef CONFIG_FEATURE_DEB_TAR_GZ
 	ar_handle->accept = llist_add_to(NULL, "data.tar.gz");
 #endif
diff --git a/archival/gzip.c b/archival/gzip.c
index 1708ac1..d494aa3 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -632,7 +632,7 @@
  *      However the F&G algorithm may be faster for some highly redundant
  *      files if the parameter max_chain_length (described below) is too large.
  *
- *  ACKNOWLEDGEMENTS
+ *  ACKNOWLEDGMENTS
  *
  *      The idea of lazy evaluation of matches is due to Jan-Mark Wams, and
  *      I found it in 'freeze' written by Leonid Broukhis.
diff --git a/archival/libunarchive/data_extract_all.c b/archival/libunarchive/data_extract_all.c
index a9a3a93..52edaa1 100644
--- a/archival/libunarchive/data_extract_all.c
+++ b/archival/libunarchive/data_extract_all.c
@@ -66,7 +66,7 @@
 		}
 	}
 
-	/* Handle hard links seperately
+	/* Handle hard links separately
 	 * We identified hard links as regular files of size 0 with a symlink */
 	if (S_ISREG(file_header->mode) && (file_header->link_name) && (file_header->size == 0)) {
 		/* hard link */
diff --git a/archival/libunarchive/decompress_bunzip2.c b/archival/libunarchive/decompress_bunzip2.c
index af16533..4b8ceb8 100644
--- a/archival/libunarchive/decompress_bunzip2.c
+++ b/archival/libunarchive/decompress_bunzip2.c
@@ -13,7 +13,7 @@
 /*
 	Size and speed optimizations by Manuel Novoa III  (mjn3@codepoet.org).
 
-	More efficient reading of huffman codes, a streamlined read_bunzip()
+	More efficient reading of Huffman codes, a streamlined read_bunzip()
 	function, and various other tweaks.  In (limited) tests, approximately
 	20% faster than bzcat on x86 and about 10% faster on arm.
 
@@ -49,10 +49,10 @@
 
 #include "libbb.h"
 
-/* Constants for huffman coding */
+/* Constants for Huffman coding */
 #define MAX_GROUPS			6
 #define GROUP_SIZE   		50		/* 64 would have been more efficient */
-#define MAX_HUFCODE_BITS 	20		/* Longest huffman code allowed */
+#define MAX_HUFCODE_BITS 	20		/* Longest Huffman code allowed */
 #define MAX_SYMBOLS 		258		/* 256 literals + RUNA + RUNB */
 #define SYMBOL_RUNA			0
 #define SYMBOL_RUNB			1
@@ -70,7 +70,7 @@
 /* Other housekeeping constants */
 #define IOBUF_SIZE			4096
 
-/* This is what we know about each huffman coding group */
+/* This is what we know about each Huffman coding group */
 struct group_data {
 	/* We have an extra slot at the end of limit[] for a sentinal value. */
 	int limit[MAX_HUFCODE_BITS+1],base[MAX_HUFCODE_BITS],permute[MAX_SYMBOLS];
@@ -92,7 +92,7 @@
 	unsigned int *dbuf, dbufSize;
 	/* These things are a bit too big to go on the stack */
 	unsigned char selectors[32768];			/* nSelectors=15 bits */
-	struct group_data groups[MAX_GROUPS];	/* huffman coding tables */
+	struct group_data groups[MAX_GROUPS];	/* Huffman coding tables */
 	/* For I/O error handling */
 	jmp_buf jmpbuf;
 } bunzip_data;
@@ -172,10 +172,10 @@
 				if(k&(1<<(15-j))) symToByte[symTotal++]=(16*i)+j;
 		}
 	}
-	/* How many different huffman coding groups does this block use? */
+	/* How many different Huffman coding groups does this block use? */
 	groupCount=get_bits(bd,3);
 	if (groupCount<2 || groupCount>MAX_GROUPS) return RETVAL_DATA_ERROR;
-	/* nSelectors: Every GROUP_SIZE many symbols we select a new huffman coding
+	/* nSelectors: Every GROUP_SIZE many symbols we select a new Huffman coding
 	   group.  Read in the group selector list, which is stored as MTF encoded
 	   bit runs.  (MTF=Move To Front, as each value is used it's moved to the
 	   start of the list.) */
@@ -189,13 +189,13 @@
 		for(;j;j--) mtfSymbol[j] = mtfSymbol[j-1];
 		mtfSymbol[0]=selectors[i]=uc;
 	}
-	/* Read the huffman coding tables for each group, which code for symTotal
+	/* Read the Huffman coding tables for each group, which code for symTotal
 	   literal symbols, plus two run symbols (RUNA, RUNB) */
 	symCount=symTotal+2;
 	for (j=0; j<groupCount; j++) {
 		unsigned char length[MAX_SYMBOLS],temp[MAX_HUFCODE_BITS+1];
 		int	minLen,	maxLen, pp;
-		/* Read huffman code lengths for each symbol.  They're stored in
+		/* Read Huffman code lengths for each symbol.  They're stored in
 		   a way similar to mtf; record a starting value for the first symbol,
 		   and an offset from the previous value for everys symbol after that.
 		   (Subtracting 1 before the loop and then adding it back at the end is
@@ -228,12 +228,12 @@
 		}
 		/* Calculate permute[], base[], and limit[] tables from length[].
 		 *
-		 * permute[] is the lookup table for converting huffman coded symbols
+		 * permute[] is the lookup table for converting Huffman coded symbols
 		 * into decoded symbols.  base[] is the amount to subtract from the
-		 * value of a huffman symbol of a given length when using permute[].
+		 * value of a Huffman symbol of a given length when using permute[].
 		 *
 		 * limit[] indicates the largest numerical value a symbol with a given
-		 * number of bits can have.  This is how the huffman codes can vary in
+		 * number of bits can have.  This is how the Huffman codes can vary in
 		 * length: each code with a value>limit[length] needs another bit.
 		 */
 		hufGroup=bd->groups+j;
@@ -275,7 +275,7 @@
 		base[minLen]=0;
 	}
 	/* We've finished reading and digesting the block header.  Now read this
-	   block's huffman coded symbols from the file and undo the huffman coding
+	   block's Huffman coded symbols from the file and undo the Huffman coding
 	   and run length encoding, saving the result into dbuf[dbufCount++]=uc */
 
 	/* Initialize symbol occurrence counters and symbol Move To Front table */
@@ -286,7 +286,7 @@
 	/* Loop through compressed symbols. */
 	runPos=dbufCount=symCount=selector=0;
 	for(;;) {
-		/* Determine which huffman coding group to use. */
+		/* Determine which Huffman coding group to use. */
 		if(!(symCount--)) {
 			symCount=GROUP_SIZE-1;
 			if(selector>=nSelectors) return RETVAL_DATA_ERROR;
@@ -294,7 +294,7 @@
 			base=hufGroup->base-1;
 			limit=hufGroup->limit-1;
 		}
-		/* Read next huffman-coded symbol. */
+		/* Read next Huffman-coded symbol. */
 		/* Note: It is far cheaper to read maxLen bits and back up than it is
 		   to read minLen bits and then an additional bit at a time, testing
 		   as we go.  Because there is a trailing last block (with file CRC),
@@ -383,7 +383,7 @@
 		byteCount[uc]++;
 		dbuf[dbufCount++] = (unsigned int)uc;
 	}
-	/* At this point, we've read all the huffman-coded symbols (and repeated
+	/* At this point, we've read all the Huffman-coded symbols (and repeated
        runs) for this block from the input stream, and decoded them into the
 	   intermediate buffer.  There are dbufCount many decoded bytes in dbuf[].
 	   Now undo the Burrows-Wheeler transform on dbuf.
@@ -439,7 +439,7 @@
 
 	/* We will always have pending decoded data to write into the output
 	   buffer unless this is the very first call (in which case we haven't
-	   huffman-decoded a block into the intermediate buffer yet). */
+	   Huffman-decoded a block into the intermediate buffer yet). */
 
 	if (bd->writeCopies) {
 		/* Inside the loop, writeCopies means extra copies (beyond 1) */
@@ -495,7 +495,7 @@
 		}
 	}
 
-	/* Refill the intermediate buffer by huffman-decoding next block of input */
+	/* Refill the intermediate buffer by Huffman-decoding next block of input */
 	/* (previous is just a convenient unused temp variable here) */
 	previous=get_next_block(bd);
 	if(previous) {
diff --git a/archival/libunarchive/decompress_uncompress.c b/archival/libunarchive/decompress_uncompress.c
index ddf293f..e39872c 100644
--- a/archival/libunarchive/decompress_uncompress.c
+++ b/archival/libunarchive/decompress_uncompress.c
@@ -30,7 +30,7 @@
 #include <string.h>
 #include <unistd.h>
 
-/* Defailt input buffer size */
+/* Default input buffer size */
 #define	IBUFSIZ	2048
 
 /* Default output buffer size */
diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c
index a436db1..35fcfee 100644
--- a/archival/libunarchive/decompress_unzip.c
+++ b/archival/libunarchive/decompress_unzip.c
@@ -892,7 +892,7 @@
 	/* Doesnt get here */
 }
 
-/* Initialise bytebuffer, be carefull not to overfill the buffer */
+/* Initialise bytebuffer, be careful not to overfill the buffer */
 extern void inflate_init(unsigned int bufsize)
 {
 	/* Set the bytebuffer size, default is same as gunzip_wsize */
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c
index c6ebdae..33f19c6 100644
--- a/archival/libunarchive/get_header_tar.c
+++ b/archival/libunarchive/get_header_tar.c
@@ -14,7 +14,7 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
  *  FIXME:
- *    In privelidged mode if uname and gname map to a uid amd gid then use the
+ *    In privileged mode if uname and gname map to a uid and gid then use the
  *    mapped value instead of the uid/gid values in tar header
  *
  *  References:
diff --git a/archival/tar.c b/archival/tar.c
index 279cbfd..8d2ccca 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -2,11 +2,11 @@
 /*
  * Mini tar implementation for busybox
  *
- * Modifed to use common extraction code used by ar, cpio, dpkg-deb, dpkg
+ * Modified to use common extraction code used by ar, cpio, dpkg-deb, dpkg
  *  Glenn McGrath <bug1@optushome.com.au>
  *
  * Note, that as of BusyBox-0.43, tar has been completely rewritten from the
- * ground up.  It still has remnents of the old code lying about, but it is
+ * ground up.  It still has remnants of the old code lying about, but it is
  * very different now (i.e., cleaner, less global variables, etc.)
  *
  * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
@@ -796,7 +796,7 @@
 	}
 
 	/* Setup an array of filenames to work with */
-	/* TODO: This is the same as in ar, seperate function ? */
+	/* TODO: This is the same as in ar, separate function ? */
 	while (optind < argc) {
 		char *filename_ptr = last_char_is(argv[optind], '/');
 		if (filename_ptr) {
