diff --git a/miscutils/strings.c b/miscutils/strings.c
index 92e9f0d..d0a0924 100644
--- a/miscutils/strings.c
+++ b/miscutils/strings.c
@@ -27,99 +27,82 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
 #include <getopt.h>
-#include <unistd.h>
 #include <ctype.h>
 #include "busybox.h"
 
 #define ISSTR(ch)	(isprint(ch) || ch == '\t')
 
+#define WHOLE_FILE		1
+#define PRINT_NAME		2
+#define PRINT_OFFSET	4
+#define SIZE			8
+
 int strings_main(int argc, char **argv)
 {
-	int n=4, c, i, opt=0, status=EXIT_SUCCESS;
-	long t=0, count;
+	int n, c, i = 0, status = EXIT_SUCCESS;
+	unsigned long opt;
+	unsigned long count;
 	FILE *file = stdin;
-	char *string=NULL;
-	const char *fmt="%s: ";
-
-	while ((i = getopt(argc, argv, "afon:")) > 0)
-		switch(i)
-		{
-			case 'a':
-				break;
-			case 'f':
-				opt+=1;
-				break;
-			case 'o':
-				opt+=2;
-				break;
-			case 'n':
-				n = bb_xgetlarg(optarg, 10, 1, INT_MAX);
-				break;
-			default:
-				bb_show_usage();
-		}
-
+	char *string;
+	const char *fmt = "%s: ";
+	char *n_arg = "4";
+	
+	opt = bb_getopt_ulflags (argc, argv, "afon:", &n_arg);
+	/* -a is our default behaviour */
+	
 	argc -= optind;
 	argv += optind;
 
-	i=0;
-
-	string=xmalloc(n+1);
-	string[n]='\0';
-	n-=1;
-
-	if(argc==0)
-	{
-		fmt="{%s}: ";
-		*argv=(char *)bb_msg_standard_input;
-		goto pipe;
+	n = bb_xgetlarg(n_arg, 10, 1, INT_MAX);
+	string = xcalloc(n + 1, 1);
+	n--;
+	
+	if ( argc == 0) {
+		fmt = "{%s}: ";
+		*argv = (char *)bb_msg_standard_input;
+		goto PIPE;
 	}
-
-	for( ;*argv!=NULL && argc>0;argv++)
-	{
-		if((file=bb_wfopen(*argv,"r")))
-		{
-pipe:
-
-			count=0;
-			do{
-				c=fgetc(file);
-				if(ISSTR(c))
-				{
-					if(i==0)
-						t=count;
-					if(i<=n)
+	
+	do {
+		if ((file = bb_wfopen(*argv, "r"))) {
+PIPE:
+			count = 0;
+			do {
+				c = fgetc(file);
+				if (ISSTR(c)) {
+					if (i <= n) {
 						string[i]=c;
-					if(i==n)
-					{
-						if(opt == 1 || opt == 3 )
-							printf(fmt,*argv);
-						if(opt >= 2 )
-							printf("%7lo ", t);
+					} else {
+						putchar(c);
+					}
+					if (i == n) {
+						if (opt & PRINT_NAME) {
+							printf(fmt, *argv);
+						}
+						if (opt & PRINT_OFFSET) {
+							printf("%7lo ", count - n );
+						}
 						printf("%s", string);
 					}
-					if(i>n)
-						putchar(c);
 					i++;
-				}
-				else
-				{
-					if(i>n)
+				} else {
+					if (i > n) {
 						putchar('\n');
-					i=0;
+					}
+					i = 0;
 				}
 				count++;
-			}while(c!=EOF);
-
+			} while (c != EOF);
 			bb_fclose_nonstdin(file);
-		}
-		else
+		} else {
 			status=EXIT_FAILURE;
-	}
-	/*free(string);*/
-	exit(status);
+		}
+	} while ( --argc > 0 );
+#ifdef CONFIG_FEATURE_CLEAN_UP	
+	free(string);
+#endif
+	bb_fflush_stdout_and_exit(status);
 }
 
 /*
