       return namespace[className] if namespace[className]
       namespace = namespace._namespace
     null
-  
+
   # Creates a new class in this namespace
   makeClass: (className, superClass, definition) ->
     # If superclass parameter omitted, use 'Object' as superclass
     unless definition
       definition = superClass
       superClass = 'Object'
-    
+
     newClass = ->
       @_class = newClass
       this
-    
+
     newClass._classMethods = []
-    
+
     # Inherit superclass
     superClass = @getClass superClass if superClass && (typeof superClass == 'string')
     if superClass
       newClass.prototype = new superClass
       newClass._superclass = superClass
-      
+
       # Inherit class methods
       for methodName in superClass._classMethods
         newClass[methodName] = superClass[methodName]
         newClass._classMethods.push methodName
-    
+
     # Set _name variable to name of class
     newClass._name = className
-      
+
     # Add class to namespace
     this[className] = newClass
     newClass._namespace = this
-    
+
     # Run class definition
     definition.call newClass
-  
+
   class: (className, superClass, definition) ->
     if arguments.length > 1
       @makeClass className, superClass, definition
     else
       @getClass className
-  
+
   module: (name, definition) ->
     @[name] ||= {
       _namespace: this

    definition.call @[name] if definition
    Spec.extend @[name] if window.Spec
    @[name]
  
  # Removes leading and trailing whitespace
  trim: (s) ->
    s.replace /(^\s+|\s+$)/g, ''
  
  # Capitalizes the first letter of a string.
  ucFirst: (s) ->
    x = String(s);
    x.substr(0, 1).toUpperCase() + x.substr(1, x.length)
  
  # Escapes a string for inclusion as a literal value in a regular expression.
  reEscape: (s) ->
    String(s).replace /\\|\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\^|\$/g, '\\$&'
  
  # Compares two values, equivalent to comparison operator (<=>)
  compare: (a, b) ->
    if a > b

    else if window.console
      console.log "Command: #{name}"
    ST._command

  endCommand: ->
    command = ST._command
    command.runOneTimeTasks()
