package bakatxt.core;

import java.awt.GraphicsEnvironment;
import java.io.IOException;
import java.util.Scanner;

import bakatxt.gui.BakaUI;

public class BakaTxtMain {

    private static Scanner _sc;
    private static BakaProcessor _processor;

    public BakaTxtMain() {

        _sc = new Scanner(System.in);
        _processor = new BakaProcessor();
    }

    public static void main(String[] args) throws IOException {

        BakaTxtMain thisSession = new BakaTxtMain();

        if (GraphicsEnvironment.isHeadless()) {
            while (true) {
                String input = _sc.nextLine();
                String result = _processor.executeCommand(input);
                System.out.println(result);
            }
        }

        BakaUI.startGui(_processor);
    }

}

@@ -57,36 +57,8 @@
 nt;%0A
-import java.io.IOException;%0A
 impo
@@ -376,82 +376,9 @@
 gs) 
-throws IOException %7B%0A%0A        BakaTxtMain thisSession = new BakaTxtMain();
+%7B
 %0A%0A  

Remove redundant calls in BakaTxtMain