private void clean() {
        Set<State> terminal = I.getTerminal();

        //System.out.println("BEFORE ANYTHING");
        //I.status("");

        I.prepareClean();

        //System.out.println("after prepareClean");
        //I.status("");

        Set<Character> alphabet = I.getChars();

        String name = null;

        for(State st : I.next.values()) {
            st.need();
        }

        for(State st : terminal) {
            name = st.getFullName();
            for(Character c : alphabet) {
                State needed = getPos(name+c);
                if(needed != null)
                    needed.need();
            }
        }

        //System.out.println("after needed");
        //I.status("");

        I.clean();

        //System.out.println("after cleaning");
        //I.status("");
    }