/* 
 * The MIT License
 *
 * Copyright 2015 Fanaen <contact@fanaen.fr>.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package alphagram;

import alphagram.model.Alphagram;
import alphagram.model.Anagram;
import java.util.Scanner;

/**
 *
 * @author Fanaen <contact@fanaen.fr>
 */
public class AlphagramCLI {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in, "UTF-8");
        String line = "";
        boolean pursue = true;
        
        // Display welcome message --
        System.out.println("-- Alphagram --");
        System.out.println("Type \"quit\" to exit.\n");
        
        while(pursue) {
            System.out.print("> ");
            line = in.nextLine();
            
            // Quit condition --
            if(line.toLowerCase().equals("quit")) {
                pursue = false;
                System.out.println("iQtu. Bey!");
            }
            // Standard line --
            else {
                processLine(line);
            }
        }
    }    

    private static void processLine(String line) {
        String[] words = line.split(" ");
        System.out.print("# ");
        
        // Multiple words --
        if(words.length > 1) {
            int i = 0;
                     
            for (String word : words) {            
                // Anagram --
                Anagram anagram = new Anagram(word);
                Alphagram alphagram = anagram.alphagram();
                
                System.out.print(alphagram.getRaw() + " (" + alphagram.getShort() + ")");
                
                // Separators --
                i++;
                System.out.print(i == words.length ? " = " : " + ");
            }
        }
        
        Anagram anagram = new Anagram(line);
        Alphagram alphagram = anagram.alphagram();

        System.out.println(alphagram.getRaw() + " (" + alphagram.getShort() + ")");
    }
}

@@ -1701,14 +1701,12 @@
 xit.
-%5Cn
 %22);%0A
+
     
@@ -1974,12 +1974,34 @@
 ln(%22
-iQtu
+ahknsT for ginsu Aaaghlmpr
 . Be
@@ -2482,208 +2482,24 @@
     
-Anagram anagram = new Anagram(word);%0A                Alphagram alphagram = anagram.alphagram();%0A                %0A                System.out.print(alphagram.getRaw() + %22 (%22 + alphagram.getShort() + %22)%22
+processWord(word
 );%0A 
@@ -2662,32 +2662,151 @@
      %7D%0A        %0A
+        processWord(line);%0A        System.out.println();%0A    %7D%0A    %0A    private static void processWord(String word) %7B%0A
         Anagram 
@@ -2827,20 +2827,20 @@
 Anagram(
-line
+word
 );%0A     
@@ -2886,16 +2886,16 @@
 ram();%0A%0A
+
         
@@ -2910,18 +2910,16 @@
 ut.print
-ln
 (alphagr

Improve CLI