anchor.diff:      files |> Seq.iter (fun x -> File.Move(x, x.Replace(applicationName, projectName)))
   
   let sed (find:string) replace folder =
  -    printfn "Changing %s to %s" find replace
       folder
       |> Directory.GetFiles
       |> Seq.iter (fun x ->
                       let contents = File.ReadAllText(x).Replace(find, replace)
                       File.WriteAllText(x, contents))
   
  -let promptList list =
  -    list |> Seq.iter (fun x -> printfn " - %s" x)
  +let promptProjectName () =
  +    printfn "Give project name:"
  +    Console.Write("> ")
  +    Console.ReadLine()
  +
  +let promptProjectDir () =
  +    printfn "Give project directory (relative to working directory):"
  +    Console.Write("> ")
  +    Console.ReadLine()
  +
  +let promptList () =
  +    printfn "Choose a template:"
  +    let templates = Directory.GetDirectories(templatesLocation)
  +                    |> Seq.map Path.GetFileName
  +                    |> Seq.where (fun x -> not <| x.StartsWith("."))
  +    templates |> Seq.iter (fun x -> printfn " - %s" x)
       printfn ""
       Console.Write("> ")
       Console.ReadLine()
   
  -let New projectName =
  -    let templatePath = Path.Combine(exeLocation, "templates")
  -    let projectFolder = Path.Combine(directory, projectName)
  +let New projectName projectDir templateName =
  +    if not ^ Directory.Exists templatesLocation then RefreshTemplates ()
   
  -    if not <| Directory.Exists templatePath
  -    then RefreshTemplates ()
  +    let projectName' = if String.IsNullOrWhiteSpace projectName then promptProjectName () else projectName
  +    let projectDir' = if String.IsNullOrWhiteSpace projectDir then promptProjectDir () else projectDir
  +    let templateName' = if String.IsNullOrWhiteSpace templateName then promptList () else templateName
  +    let projectFolder = directory </> projectDir' </> projectName'
  +    let templateDir = templatesLocation </> templateName'
   
  -    printfn "Choose a template:"
  -    let templates = Directory.GetDirectories(templatePath)
  -                    |> Seq.map Path.GetFileName
  -                    |> Seq.where (fun x -> not <| x.StartsWith("."))
  -
  -    let templateChoice = promptList templates
  -    printfn "Fixing template %s" templateChoice
  -    let templateDir = Path.Combine(templatePath, templateChoice)
  +    printfn "Generating project..."
   
       Fake.FileHelper.CopyDir projectFolder templateDir (fun _ -> true)
  +    applicationNameToProjectName projectFolder projectName
  +    sed "<%= namespace %>" projectName projectFolder
  +    sed "<%= guid %>" (Guid.NewGuid().ToString()) projectFolder
   
  -    printfn "Changing filenames from ApplicationName.* to %s.*" projectName
  -    applicationNameToProjectName projectFolder projectName
  -
  -    sed "<%= namespace %>" projectName projectFolder
  -
  -    let guid = Guid.NewGuid().ToString()
  -    sed "<%= guid %>" guid projectFolder
       printfn "Done!"
   
   let alterProject project (f : ProjectFile -> ProjectFile) =
  
positive.code:     | [| project |] -> f fileName project.Name node
      | [||] -> printfn "No project found in this directory."
      | _ ->
          let project = projects |> Seq.map (fun x -> x.Name) |> promptList
          f fileName project node
  
  let Add fileName =
  
negative.code: open System.Net
  
  let exeLocation = System.Reflection.Assembly.GetEntryAssembly().Location |> Path.GetDirectoryName
  let templatesLocation = Path.Combine(exeLocation, "templates")
  let directory = System.Environment.CurrentDirectory
  
  let paketLocation = exeLocation </> "Tools" </> "Paket"
  let fakeLocation = exeLocation </> "Tools" </> "FAKE"
  let fakeToolLocation = fakeLocation </> "tools"
  
  let (^) = (<|)
  
  let RefreshTemplates () =
      printfn "Getting templates..."
  