diff --git a/ChangeLog b/ChangeLog
index 76eee7c59b6d9279600a8aa1e56b75f88e355814..aa24a3b8aa19663d52d6e9247cd0245b775128ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-06-04  David Lawrence Ramsey  <pooka109@gmail.com>
+        * src/*.c: Adjustments of whitespace and comments.
+        * doc/nanorc.sample.in: Interpunction tweaks.
+
 2014-06-02  Chris Allegretta <chrisa@asty.org>
 	* doc/syntax/default.nanorc: Can't do trailing spaces in the
 	  default syntax or it will hilight the spaces as you type
diff --git a/doc/nanorc.sample.in b/doc/nanorc.sample.in
index d2dc9661b182dd4c4e13dbf7962d8fee2a41c2ac..beafe4900b27f2d835f59fa3b7f39228512f63e8 100644
--- a/doc/nanorc.sample.in
+++ b/doc/nanorc.sample.in
@@ -61,7 +61,7 @@
 
 ## Enable vim-style lock-files.  This is just to let a vim user know you
 ## are editing a file [s]he is trying to edit and vice versa. There are
-## no plans to implement vim-style undo state in these files
+## no plans to implement vim-style undo state in these files.
 # set locking
 
 ## The opening and closing brackets that can be found by bracket
@@ -162,7 +162,7 @@
 ## Convert typed tabs to spaces.
 # set tabstospaces
 
-## Save automatically on exit, don't prompt.
+## Save automatically on exit; don't prompt.
 # set tempfile
 
 ## Enable the new (EXPERIMENTAL) generic undo code, not just for line
@@ -186,7 +186,7 @@
 
 
 ## Paint the interface elements of nano.
-## This is an example, by default there are no colors.
+## This is an example; by default there are no colors.
 # set titlecolor brightwhite,blue
 # set statuscolor brightwhite,green
 # set keycolor green
diff --git a/src/browser.c b/src/browser.c
index 722dc9f66624e7e50da6c0df8487759e773feae5..a97b9f8595b9c0a8cfe862e16e551e36ed6d2230 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -127,8 +127,7 @@ char *do_browser(char *path, DIR *dir)
 	kbinput = get_kbinput(edit, &meta_key, &func_key);
 
 #ifndef DISABLE_MOUSE
-        if (kbinput == KEY_MOUSE) {
-
+	if (kbinput == KEY_MOUSE) {
 		    int mouse_x, mouse_y;
 
 		    /* We can click on the edit window to select a
diff --git a/src/files.c b/src/files.c
index 834bba3d91c801f0325565bc18f49aa7bec43141..0fb7708c8118a17bcc92fd9a8c65e93662581f7b 100644
--- a/src/files.c
+++ b/src/files.c
@@ -3133,7 +3133,7 @@ void update_poshistory(char *filename, ssize_t lineno, ssize_t xpos)
     }
 
     /* Didn't find it, make a new node yo! */
-    posptr = (poshiststruct *) nmalloc(sizeof(poshiststruct));
+    posptr = (poshiststruct *)nmalloc(sizeof(poshiststruct));
     posptr->filename = mallocstrcpy(NULL, fullpath);
     posptr->lineno = lineno;
     posptr->xno = xpos;
@@ -3207,7 +3207,7 @@ void load_poshistory(void)
 		lineno = atoi(lineptr);
 		xno = atoi(xptr);
 		if (poshistory == NULL) {
-		    poshistory = (poshiststruct *) nmalloc(sizeof(poshiststruct));
+		    poshistory = (poshiststruct *)nmalloc(sizeof(poshiststruct));
 		    poshistory->filename = mallocstrcpy(NULL, line);
 		    poshistory->lineno = lineno;
 		    poshistory->xno = xno;
@@ -3215,7 +3215,7 @@ void load_poshistory(void)
 		} else {
 		    for (posptr = poshistory; posptr->next != NULL; posptr = posptr->next)
 			;
-		    posptr->next = (poshiststruct *) nmalloc(sizeof(poshiststruct));
+		    posptr->next = (poshiststruct *)nmalloc(sizeof(poshiststruct));
 		    posptr->next->filename = mallocstrcpy(NULL, line);
 		    posptr->next->lineno = lineno;
 		    posptr->next->xno = xno;
diff --git a/src/global.c b/src/global.c
index 08370aeafcbb73f7d4f50d4cfc12cb611b5d512b..dbaf94e018463d6ea84ec66ea1681a4b603e4ab5 100644
--- a/src/global.c
+++ b/src/global.c
@@ -344,7 +344,7 @@ void add_to_sclist(int menu, const char *scstring, void (*func)(void), int toggl
     sc *s;
 
     if (sclist == NULL) {
-	sclist = (sc *) nmalloc(sizeof(sc));
+	sclist = (sc *)nmalloc(sizeof(sc));
 	s = sclist;
         s->next = NULL;
     } else {
diff --git a/src/nano.c b/src/nano.c
index d495ab396b6f72eea9385da024418fe9d4543969..9f782608f94d37041127175b2026948fcfa72096 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -616,7 +616,7 @@ void finish(void)
     if (!no_rcfiles && ISSET(HISTORYLOG))
 	save_history();
     if (!no_rcfiles && ISSET(POS_HISTORY)) {
-	update_poshistory(openfile->filename, openfile->current->lineno, xplustabs()+1);
+	update_poshistory(openfile->filename, openfile->current->lineno, xplustabs() + 1);
 	save_poshistory();
     }
 #endif
@@ -1825,7 +1825,7 @@ int do_mouse(void)
 void alloc_multidata_if_needed(filestruct *fileptr)
 {
     if (!fileptr->multidata)
-	fileptr->multidata = (short *) nmalloc(openfile->syntax->nmultis * sizeof(short));
+	fileptr->multidata = (short *)nmalloc(openfile->syntax->nmultis * sizeof(short));
 }
 
 /* Precalculate the multi-line start and end regex info so we can
diff --git a/src/text.c b/src/text.c
index 29d9fb07f870d96d44ee679a9bd4044e5e6dca1e..66142d3c24fb235d2672aabe64f6109092958bea 100644
--- a/src/text.c
+++ b/src/text.c
@@ -1011,7 +1011,7 @@ void update_undo(undo_type action)
 #endif
 	char *char_buf = charalloc(mb_cur_max());
 	size_t char_buf_len = parse_mbchar(&fs->current->data[u->mark_begin_x], char_buf, NULL);
-	u->strdata = addstrings(u->strdata, u->strdata?strlen(u->strdata):0, char_buf, char_buf_len);
+	u->strdata = addstrings(u->strdata, u->strdata ? strlen(u->strdata) : 0, char_buf, char_buf_len);
 #ifdef DEBUG
 	fprintf(stderr, "current undo data now \"%s\"\n", u->strdata);
 #endif
@@ -1022,11 +1022,11 @@ void update_undo(undo_type action)
     case DEL: {
 	char *char_buf = charalloc(mb_cur_max());
 	size_t char_buf_len = parse_mbchar(&fs->current->data[fs->current_x], char_buf, NULL);
-        if (fs->current_x == u->begin) {
+	if (fs->current_x == u->begin) {
 	    /* They're deleting. */
 	    u->strdata = addstrings(u->strdata, strlen(u->strdata), char_buf, char_buf_len);
 	    u->mark_begin_x = fs->current_x;
-	} else if (fs->current_x == u->begin - char_buf_len){
+	} else if (fs->current_x == u->begin - char_buf_len) {
 	    /* They're backspacing. */
 	    u->strdata = addstrings(char_buf, char_buf_len, u->strdata, strlen(u->strdata));
 	    u->begin = fs->current_x;
diff --git a/src/utils.c b/src/utils.c
index 3aab3fc0630e005b35ab2d3c4e5eb9be3ad062d7..de565e897d9924bb9f6549d28d35cb7cf0089310 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -261,7 +261,8 @@ bool regexp_bol_or_eol(const regex_t *preg, const char *string)
 
 /* Fix the regex if we're on platforms which require an adjustment
  * from GNU-style to BSD-style word boundaries. */
-const char *fixbounds(const char *r) {
+const char *fixbounds(const char *r)
+{
 #ifndef GNU_WORDBOUNDS
     int i, j = 0;
     char *r2 = charalloc(strlen(r) * 5);
@@ -272,15 +273,15 @@ const char *fixbounds(const char *r) {
 #endif
 
     for (i = 0; i < strlen(r); i++) {
-        if (r[i] != '\0' && r[i] == '\\' && (r[i+1] == '>' || r[i+1] == '<')) {
-            strcpy(&r2[j], "[[:");
-            r2[j+3] = r[i+1];
-            strcpy(&r2[j+4], ":]]");
-            i++;
-            j += 6;
-        } else
-            r2[j] = r[i];
-        j++;
+	if (r[i] != '\0' && r[i] == '\\' && (r[i + 1] == '>' || r[i + 1] == '<')) {
+	    strcpy(&r2[j], "[[:");
+	    r2[j + 3] = r[i + 1];
+	    strcpy(&r2[j + 4], ":]]");
+	    i++;
+	    j += 6;
+	} else
+	    r2[j] = r[i];
+	j++;
     }
     r2[j] = '\0';
     r3 = mallocstrcpy(NULL, r2);
diff --git a/src/winio.c b/src/winio.c
index 0357b9341aea35d01fca34b538d4c95674e4281d..b5a66149c35b6e29078715513a1d1aa695c319db 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -1053,7 +1053,7 @@ int get_escape_seq_kbinput(const int *seq, size_t seq_len)
 			break;
 		    case '6': /* Esc [ 6 ~ == PageDown on VT220/VT320/
 			       * Linux console/xterm/Terminal;
-			        * Esc [ 6 ^ == PageDown on Eterm. */
+			       * Esc [ 6 ^ == PageDown on Eterm. */
 			retval = sc_seq_or(do_page_down, 0);
 			break;
 		    case '7': /* Esc [ 7 ~ == Home on rxvt. */
@@ -2495,10 +2495,11 @@ void edit_draw(filestruct *fileptr, const char *converted, int
     /* First simply paint the line -- then we'll add colors or the
      * marking highlight on just the pieces that need it. */
     mvwaddstr(edit, line, 0, converted);
-    /* Tell ncurses to really redraw the line without trying to optimize
-       for what it thinks is already there, because it gets it wrong in
-       the case of a wide character in column zero.  See bug #31743. */
+
 #ifndef USE_SLANG
+    /* Tell ncurses to really redraw the line without trying to optimize
+     * for what it thinks is already there, because it gets it wrong in
+     * the case of a wide character in column zero.  See bug #31743. */
     wredrawln(edit, line, 1);
 #endif
 
@@ -2508,13 +2509,15 @@ void edit_draw(filestruct *fileptr, const char *converted, int
     if (openfile->colorstrings != NULL && !ISSET(NO_COLOR_SYNTAX)) {
 	const colortype *tmpcolor = openfile->colorstrings;
 
-	/* Set up multi-line color data for this line if it's not yet calculated. */
-        if (fileptr->multidata == NULL && openfile->syntax
+	/* Set up multi-line color data for this line if it's not yet
+	 * calculated. */
+	if (fileptr->multidata == NULL && openfile->syntax
 		&& openfile->syntax->nmultis > 0) {
 	    int i;
-	    fileptr->multidata = (short *) nmalloc(openfile->syntax->nmultis * sizeof(short));
-            for (i = 0; i < openfile->syntax->nmultis; i++)
-		fileptr->multidata[i] = -1;	/* Assume this applies until we know otherwise. */
+	    fileptr->multidata = (short *)nmalloc(openfile->syntax->nmultis * sizeof(short));
+	    for (i = 0; i < openfile->syntax->nmultis; i++)
+		/* Assume this applies until we know otherwise. */
+		fileptr->multidata[i] = -1;
 	}
 	for (; tmpcolor != NULL; tmpcolor = tmpcolor->next) {
 	    int x_start;
@@ -2601,7 +2604,8 @@ void edit_draw(filestruct *fileptr, const char *converted, int
 		short md = fileptr->multidata[tmpcolor->id];
 
 		if (md == -1)
-		    fileptr->multidata[tmpcolor->id] = CNONE; /* until we find out otherwise */
+		    /* Assume this until we know otherwise. */
+		    fileptr->multidata[tmpcolor->id] = CNONE;
 		else if (md == CNONE)
 		    goto end_of_loop;
 		else if (md == CWHOLELINE) {