         parts = parts.slice(1)  if parts[0] is ""
         name = parts[0]
         handler = _self.root_commands[name]
-        if handler is `undefined`
+        unless handler?
           callback()
         else if parts.length is 1
-
           # item 1, commands
           node =
             name: name
             path: path
             children: null
-
 
           # implicitly call command as part of path
           command = handler.exec

          _self.OAuth = request.feedlytoken
          _console.debug "[feedlyconsole] token %s...", _self.OAuth.slice(0, 8)
        else
          _console.debug "[feedlyconsole] unknown action %s request %O.", request.action, request
        sendResponse action: "ack"

    else

      exec: (cmd, args, callback) ->
        get command_name, null, (data) ->
          return err("api request failed to get data")  unless data
          template = _self.shell.templates[command_name]
          template = template or _self.shell.templates.default_template
          template_args = {}
          template_args[command_name] = template_args["data"] = data
          _console.debug "[Josh.FeedlyConsole] data %O cmd %O args %O",
          data, cmd, args
          callback template(template_args)


