diff --git a/planetstack/core/static/shell/opencloud_shell.js b/planetstack/core/static/shell/opencloud_shell.js
index 1715fdd..d57d475 100644
--- a/planetstack/core/static/shell/opencloud_shell.js
+++ b/planetstack/core/static/shell/opencloud_shell.js
@@ -254,52 +254,52 @@
   },
 
   _tutorial: function() {
-    this._tutorialPtr = 0;
-    return PTAG("This is a self-guided tutorial on the OpenCloud shell.") +
-           PTAG("The tutorial is simple, more or less a few basic commands to try.") +
-           PTAG("To go directly to any part tutorial, enter one of the commands t0, t1, t2...t10") +
-           PTAG("Otherwise, use 'next' and 'back'. Start by typing 'next' and pressing enter.");
+    this._tutorialPtr = 0;
+    return PTAG("This is a self-guided tutorial on the OpenCloud shell.") +
+           PTAG("The tutorial is simple, more or less a few basic commands to try.") +
+           PTAG("To go directly to any part tutorial, enter one of the commands t0, t1, t2...t10") +
+           PTAG("Otherwise, use 'next' and 'back'. Start by typing 'next' and pressing enter.");
   },
 
   // go to the next step in the tutorial.
-  _next: function() {
-    if(this._tutorialPtr < this._tutorialMax) {
-      return this['_t' + (this._tutorialPtr + 1)]();
-    }
-    else {
-      return "You've reached the end of the tutorial. To go to the beginning, type 'tutorial'";
-    }
-  },
-
-  // go to the previous step in the tutorial.
-  _back: function() {
-    if(this._tutorialPtr > 1) {
-      return this['_t' + (this._tutorialPtr - 1)]();
-    }
-    else {
-      return this._tutorial();
-    }
+  _next: function() {
+    if(this._tutorialPtr < this._tutorialMax) {
+      return this['_t' + (this._tutorialPtr + 1)]();
+    }
+    else {
+      return "You've reached the end of the tutorial. To go to the beginning, type 'tutorial'";
+    }
+  },
+
+  // go to the previous step in the tutorial.
+  _back: function() {
+    if(this._tutorialPtr > 1) {
+      return this['_t' + (this._tutorialPtr - 1)]();
+    }
+    else {
+      return this._tutorial();
+    }
   },
 
   _t1: function() {
-    this._tutorialPtr = 1;
-    return PTAG('1. JavaScript Shell') +
-           PTAG('The first thing to notice is that the MongoDB shell is JavaScript-based.') +
-           PTAG('So you can do things like:') +
-           PTAG('  a = 5; ') +
-           PTAG('  a * 10; ') +
-           PTAG('  print(a); ') +
-           PTAG("  for(i=0; i<10; i++) { print('hello'); }; ") +
-           PTAG("Try a few JS commands; when you're ready to move on, enter 'next'");
-
+    this._tutorialPtr = 1;
+    return PTAG('1. JavaScript Shell') +
+           PTAG('The first thing to notice is that the MongoDB shell is JavaScript-based.') +
+           PTAG('So you can do things like:') +
+           PTAG('  a = 5; ') +
+           PTAG('  a * 10; ') +
+           PTAG('  print(a); ') +
+           PTAG("  for(i=0; i<10; i++) { print('hello'); }; ") +
+           PTAG("Try a few JS commands; when you're ready to move on, enter 'next'");
+
   },
 
   _t2: function() {
-    this._tutorialPtr = 2;
-    return PTAG('2. List some slices') +
-           PTAG('Type this:') +
-           PTAG('    opencloud.slices.listAll();');
-
+    this._tutorialPtr = 2;
+    return PTAG('2. List some slices') +
+           PTAG('Type this:') +
+           PTAG('    opencloud.slices.listAll();');
+
   },
 
   _getCommand: function(tokens) {
@@ -309,14 +309,14 @@
           return this._help;
 
         case 'tutorial':
-          return this._tutorial;
-        case 'next':
-          return this._next;
-        case 'back':
-          return this._back;
-        case 't0':
-          return this._tutorial;
-        case 't1':
+          return this._tutorial;
+        case 'next':
+          return this._next;
+        case 'back':
+          return this._back;
+        case 't0':
+          return this._tutorial;
+        case 't1':
           return this._t1;
         case 't2':
           return this._t2;
