         * #{name} (index.coffee): Application created.
     """
 
-  prepareApplication:({isBlank, name}, callback)->
-
-    type         = if isBlank then "blank" else "sample"
-    name         = if name is "" then null else name
-    name         = name.replace(/[^a-zA-Z0-9\/\-.]/g, '')  if name
+  prepareApplication:(name, callback)->
+
+    unless name
+      return new KDNotificationView
+        title : "Application name is not provided."
+
+    type         = "blank"
+    name         = name.replace /[^a-zA-Z0-9\/\-.]/g, ''
     manifestStr  = defaultManifest type, name
     changeLogStr = @_createChangeLog name
     manifest     = JSON.parse manifestStr

                  color           : "#444444"
                  diameter        : 12
                callback          : =>
                  unless newAppModal.modalTabs.forms.form.inputs.name.validate()
                    newAppModal.modalTabs.forms.form.buttons.Create.hideLoader()
                    return
                  name        = newAppModal.modalTabs.forms.form.inputs.name.getValue()
                  type        = newAppModal.modalTabs.forms.form.inputs.type.getValue()
                  name        = name.replace(/[^a-zA-Z0-9\/\-.]/g, '')  if name
                  manifestStr = defaultManifest type, name
                  manifest    = JSON.parse manifestStr
                  appPath     = @getAppPath manifest

                  # FIXME Use default VM ~ GG
                  FSHelper.exists appPath, null, (err, exists)=>
                    if exists
                      newAppModal.modalTabs.forms.form.buttons.Create.hideLoader()
                      new KDNotificationView
                        type      : "mini"
                        cssClass  : "error"
                        title     : "App folder with that name is already exists, please choose a new name."
                        duration  : 3000
                    else
                      @prepareApplication {isBlank : type is "blank", name}, (err, response)=>
                        callback? err
                        newAppModal.modalTabs.forms.form.buttons.Create.hideLoader()
                        newAppModal.destroy()

            fields                :
              type                :
                label             : "Type"
                itemClass         : KDSelectBox
                type              : "select"
                name              : "type"
                defaultValue      : "sample"
                selectOptions     : [
                  { title : "Sample Application", value : "sample" }
                  { title : "Blank Application",  value : "blank"  }
                ]
              name                :
                label             : "Name:"
                name              : "name"
                placeholder       : "name your application..."
                validate          :
                  rules           :
                    regExp        : /^[a-z\d]+([-][a-z\d]+)*$/i
                  messages        :
                    regExp        : "For Application name only lowercase letters and numbers are allowed!"

    newAppModal.once "KDObjectWillBeDestroyed", ->
      newAppModal = null

    newAppModal = new KDModalViewWithForms
      title                       : "Create a new Application"
      content                     :
        """
          <div class='modalformline'>
            <p>
              Please provide a name for your awesome Koding App you want to start with.
            </p>
          </div>
        """
      overlay                     : yes
      width                       : 600
      height                      : "auto"
      tabs                        :
        navigable                 : yes
