diff --git a/chipset_enable.c b/chipset_enable.c
index 8a4fd56..fb0148c 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -506,7 +506,7 @@
 		if (ret)
 			printf("Failed!\n");
 		else
-			printf("OK.\n");
+			printf("OK\n");
 	}
 
 	return ret;
diff --git a/layout.c b/layout.c
index 6f87dd6..36d5da7 100644
--- a/layout.c
+++ b/layout.c
@@ -40,21 +40,21 @@
 	}
 
 	if ((*walk) == 0 || ((*walk) & 0x3ff) != 0) {
-		printf("Flash image seems to be a legacy BIOS. Disabling checks.\n");
+		printf("Flash image seems to be a legacy BIOS - disabling checks\n");
 		mainboard_vendor = def_name;
 		mainboard_part = def_name;
 		return 0;
 	}
 
 	printf_debug("LinuxBIOS last image size "
-		     "(not rom size) is %d bytes.\n", *walk);
+		     "(not ROM size) is %d bytes\n", *walk);
 
 	walk--;
 	mainboard_part = strdup((const char *)(bios + size - *walk));
 	walk--;
 	mainboard_vendor = strdup((const char *)(bios + size - *walk));
-	printf_debug("MANUFACTURER: %s\n", mainboard_vendor);
-	printf_debug("MAINBOARD ID: %s\n", mainboard_part);
+	printf_debug("Manufacturer: %s\n", mainboard_vendor);
+	printf_debug("Mainboard ID: %s\n", mainboard_part);
 
 	/*
 	 * If lb_vendor is not set, the linuxbios table was
@@ -74,18 +74,18 @@
 	if (!strcasecmp(mainboard_vendor, lb_vendor) &&
 	    !strcasecmp(mainboard_part, lb_part)) {
 		printf_debug("This firmware image matches "
-			     "this motherboard.\n");
+			     "this motherboard\n");
 	} else {
 		if (force) {
 			printf("WARNING: This firmware image does not "
-			       "seem to fit to this machine - forcing it.\n");
+			       "seem to fit to this machine - forcing it\n");
 		} else {
 			printf("ERROR: Your firmware image (%s:%s) does not "
 			       "appear to\n       be correct for the detected "
 			       "mainboard (%s:%s)\n\nOverride with --force if you "
 			       "are absolutely sure that you\nare using a correct "
 			       "image for this mainboard or override\nthe detected "
-			       "values with --mainboard <vendor>:<mainboard>.\n\n",
+			       "values with --mainboard <vendor>:<mainboard>\n\n",
 			       mainboard_vendor, mainboard_part, lb_vendor,
 			       lb_part);
 			exit(1);
@@ -104,7 +104,7 @@
 	romlayout = fopen(name, "r");
 
 	if (!romlayout) {
-		fprintf(stderr, "ERROR: Could not open rom layout (%s).\n",
+		fprintf(stderr, "ERROR: Could not open ROM layout (%s)\n",
 			name);
 		return -1;
 	}
@@ -150,11 +150,11 @@
 	for (i = 0; i < romimages; i++) {
 		if (!strcmp(rom_entries[i].name, name)) {
 			rom_entries[i].included = 1;
-			printf("found.\n");
+			printf("found\n");
 			return i;
 		}
 	}
-	printf("not found.\n");
+	printf("not found\n");
 	// Not found. Error.
 
 	return -1;
diff --git a/lbtable.c b/lbtable.c
index a95f920..2365e15 100644
--- a/lbtable.c
+++ b/lbtable.c
@@ -42,8 +42,7 @@
 		uint8_t byte[2];
 		uint16_t word;
 	} value;
-	unsigned long sum;
-	unsigned long i;
+	unsigned long sum, i;
 
 	/* In the most straight forward way possible,
 	 * compute an ip style checksum.
@@ -53,15 +52,13 @@
 	for (i = 0; i < length; i++) {
 		unsigned long value;
 		value = ptr[i];
-		if (i & 1) {
+		if (i & 1)
 			value <<= 8;
-		}
 		/* Add the new value */
 		sum += value;
 		/* Wrap around the carry */
-		if (sum > 0xFFFF) {
+		if (sum > 0xFFFF)
 			sum = (sum + (sum >> 16)) & 0xFFFF;
-		}
 	}
 	value.byte[0] = sum & 0xff;
 	value.byte[1] = (sum >> 8) & 0xff;
@@ -110,17 +107,17 @@
 			continue;
 		}
 		if (count_lb_records(head) != head->table_entries) {
-			fprintf(stderr, "bad record count: %d\n",
+			fprintf(stderr, "Bad record count: %d\n",
 				head->table_entries);
 			continue;
 		}
 		if (compute_checksum((uint8_t *) head, sizeof(*head)) != 0) {
-			fprintf(stderr, "bad header checksum\n");
+			fprintf(stderr, "Bad header checksum\n");
 			continue;
 		}
 		if (compute_checksum(recs, head->table_bytes)
 		    != head->table_checksum) {
-			fprintf(stderr, "bad table checksum: %04x\n",
+			fprintf(stderr, "Bad table checksum: %04x\n",
 				head->table_checksum);
 			continue;
 		}
@@ -140,7 +137,7 @@
 
 	rec = (struct lb_mainboard *)ptr;
 	max_size = rec->size - sizeof(*rec);
-	printf("vendor id: %.*s part id: %.*s\n",
+	printf("Vendor ID: %.*s, part ID: %.*s\n",
 	       max_size - rec->vendor_idx,
 	       rec->strings + rec->vendor_idx,
 	       max_size - rec->part_number_idx,
@@ -151,7 +148,7 @@
 		 rec->strings + rec->part_number_idx);
 
 	if (lb_part) {
-		printf("overwritten by command line, vendor id: %s part id: %s\n", lb_vendor, lb_part);
+		printf("Overwritten by command line, vendor ID: %s, part ID: %s\n", lb_vendor, lb_part);
 	} else {
 		lb_part = strdup(part);
 		lb_vendor = strdup(vendor);
@@ -201,7 +198,7 @@
 	if (lb_table) {
 		unsigned long addr;
 		addr = ((char *)lb_table) - ((char *)low_1MB);
-		printf_debug("lb_table found at address %p\n", lb_table);
+		printf_debug("LinuxBIOS table found at address %p\n", lb_table);
 		rec = (struct lb_record *)(((char *)lb_table) + lb_table->header_bytes);
 		last = (struct lb_record *)(((char *)rec) + lb_table->table_bytes);
 		printf_debug("LinuxBIOS header(%d) checksum: %04x table(%d) checksum: %04x entries: %d\n",
@@ -210,7 +207,7 @@
 		     lb_table->table_entries);
 		search_lb_records(rec, last, addr + lb_table->header_bytes);
 	} else {
-		printf("No LinuxBIOS table found.\n");
+		printf("No LinuxBIOS table found\n");
 		return -1;
 	}
 
diff --git a/udelay.c b/udelay.c
index 2026d3e..1bab27d 100644
--- a/udelay.c
+++ b/udelay.c
@@ -56,5 +56,5 @@
 	micro = count / timeusec;
 
 	printf_debug("%ldM loops per second. ", (unsigned long)micro);
-	printf("ok\n");
+	printf("OK\n");
 }
