diff --git a/adeterminize2/src/adeterminize.cpp b/adeterminize2/src/adeterminize.cpp
index 13de4d05d1c8233b60a596e8877d6b238d284faa..b2cd3c501384f71a4f13ad5fb91ce85b7c85b2bc 100644
--- a/adeterminize2/src/adeterminize.cpp
+++ b/adeterminize2/src/adeterminize.cpp
@@ -13,7 +13,6 @@
 #include <lexer/Lexer.h>
 #include <parser/Parser.h>
 
-
 int main(int argc, char** argv) {
 	try {
 		common::GlobalData::argc = argc;
diff --git a/alib2algo/src/automaton/simplify/Minimize.cpp b/alib2algo/src/automaton/simplify/Minimize.cpp
index d730b03701d7bcc7b98b3a65ec1bb885974c55ec..e99008bed80c9334a00d17f640a5d6166a343a87 100644
--- a/alib2algo/src/automaton/simplify/Minimize.cpp
+++ b/alib2algo/src/automaton/simplify/Minimize.cpp
@@ -12,15 +12,8 @@ namespace automaton {
 
 namespace simplify {
 
-automaton::Automaton Minimize::minimize(const automaton::Automaton& automaton) {
-	return dispatch(automaton.getData());
-}
-
-auto MinimizeNFA = registration::OverloadRegister < Minimize, automaton::DFA < >, automaton::DFA < > >( Minimize::minimize );
-auto MinimizeNFTA = registration::OverloadRegister < Minimize, automaton::DFTA < >, automaton::DFTA < > >( Minimize::minimize );
-
-auto MinimizeNFA2 = registration::AbstractRegister < Minimize, automaton::DFA < >, const automaton::DFA < > & > ( Minimize::minimize );
-auto MinimizeNFTA2 = registration::AbstractRegister < Minimize, automaton::DFTA < >, const automaton::DFTA < > & > ( Minimize::minimize );
+auto MinimizeNFA = registration::AbstractRegister < Minimize, automaton::DFA < >, const automaton::DFA < > & > ( Minimize::minimize );
+auto MinimizeNFTA = registration::AbstractRegister < Minimize, automaton::DFTA < >, const automaton::DFTA < > & > ( Minimize::minimize );
 
 } /* namespace simplify */
 
diff --git a/alib2algo/src/automaton/simplify/Minimize.h b/alib2algo/src/automaton/simplify/Minimize.h
index 778c1c154c2a2e3f5b97769a6503c57408b642fc..ca55e515cec207716cc9a5f4ea0b80454e780f55 100644
--- a/alib2algo/src/automaton/simplify/Minimize.h
+++ b/alib2algo/src/automaton/simplify/Minimize.h
@@ -8,8 +8,6 @@
 #ifndef MINIMIZE_H_
 #define MINIMIZE_H_
 
-#include <core/multipleDispatch.hpp>
-#include <automaton/Automaton.h>
 #include <automaton/FSM/DFA.h>
 #include <automaton/TA/DFTA.h>
 
@@ -24,13 +22,8 @@ namespace automaton {
 
 namespace simplify {
 
-class Minimize : public alib::SingleDispatch<Minimize, automaton::Automaton, const automaton::AutomatonBase &> {
+class Minimize {
 public:
-	/**
-	 * @param dfa automaton to minimize
-	 */
-	static automaton::Automaton minimize(const automaton::Automaton& dfa);
-
 	template < class SymbolType, class StateType >
 	static automaton::DFA < SymbolType, StateType > minimize(const automaton::DFA < SymbolType, StateType >& dfa);
 
diff --git a/alib2algo/src/automaton/simplify/MinimizeBrzozowski.cpp b/alib2algo/src/automaton/simplify/MinimizeBrzozowski.cpp
index b5476bf1419e65c312453a7f4155bb77a5cc7c2d..ddaf71135666c6ba3fb5affeb3c31a4be4f913f7 100644
--- a/alib2algo/src/automaton/simplify/MinimizeBrzozowski.cpp
+++ b/alib2algo/src/automaton/simplify/MinimizeBrzozowski.cpp
@@ -12,17 +12,8 @@ namespace automaton {
 
 namespace simplify {
 
-automaton::Automaton MinimizeBrzozowski::minimize(const automaton::Automaton& automaton) {
-	automaton::Automaton res = dispatch(automaton.getData());
-	res.normalize ( );
-	return res;
-}
-
-auto MinimizeBrzozowskiDFA = registration::OverloadRegister < MinimizeBrzozowski, automaton::DFA < DefaultSymbolType, ext::set < ext::set < DefaultStateType > > >, automaton::DFA < > > ( MinimizeBrzozowski::minimize );
-auto MinimizeBrzozowskiNFA = registration::OverloadRegister < MinimizeBrzozowski, automaton::DFA < DefaultSymbolType, ext::set < ext::set < DefaultStateType > > >, automaton::NFA < > > ( MinimizeBrzozowski::minimize );
-
-auto MinimizeBrzozowskiDFA2 = registration::AbstractRegister < MinimizeBrzozowski, automaton::DFA < DefaultSymbolType, ext::set < ext::set < DefaultStateType > > >, const automaton::DFA < > & > ( MinimizeBrzozowski::minimize );
-auto MinimizeBrzozowskiNFA2 = registration::AbstractRegister < MinimizeBrzozowski, automaton::DFA < DefaultSymbolType, ext::set < ext::set < DefaultStateType > > >, const automaton::NFA < > & > ( MinimizeBrzozowski::minimize );
+auto MinimizeBrzozowskiDFA = registration::AbstractRegister < MinimizeBrzozowski, automaton::DFA < DefaultSymbolType, ext::set < ext::set < DefaultStateType > > >, const automaton::DFA < > & > ( MinimizeBrzozowski::minimize );
+auto MinimizeBrzozowskiNFA = registration::AbstractRegister < MinimizeBrzozowski, automaton::DFA < DefaultSymbolType, ext::set < ext::set < DefaultStateType > > >, const automaton::NFA < > & > ( MinimizeBrzozowski::minimize );
 
 } /* namespace simplify */
 
diff --git a/alib2algo/src/automaton/simplify/MinimizeBrzozowski.h b/alib2algo/src/automaton/simplify/MinimizeBrzozowski.h
index b022d9c73d5f1c9b0cdf17b1e41b92578eae5220..a03162d17ff3fa78994977b32b01b2abd9c9b430 100644
--- a/alib2algo/src/automaton/simplify/MinimizeBrzozowski.h
+++ b/alib2algo/src/automaton/simplify/MinimizeBrzozowski.h
@@ -4,12 +4,10 @@
  *  Created on: 18. 11. 2014
  *	  Author: Tomas Pecka
  */
- 
+
 #ifndef MINIMIZE_BRZOZOWSKI_H_
 #define MINIMIZE_BRZOZOWSKI_H_
 
-#include <core/multipleDispatch.hpp>
-#include <automaton/Automaton.h>
 #include <automaton/FSM/DFA.h>
 #include <automaton/FSM/NFA.h>
 #include <automaton/FSM/MultiInitialStateNFA.h>
@@ -21,13 +19,8 @@ namespace automaton {
 
 namespace simplify {
 
-class MinimizeBrzozowski : public alib::SingleDispatch<MinimizeBrzozowski, automaton::Automaton, const automaton::AutomatonBase &> {
+class MinimizeBrzozowski {
 public:
-	/**
-	 * @param dfa automaton to minimize
-	 */
-	static automaton::Automaton minimize(const automaton::Automaton& dfa);
-
 	template < class SymbolType, class StateType >
 	static automaton::DFA < SymbolType, ext::set < ext::set < StateType > > > minimize(const automaton::DFA < SymbolType, StateType > & dfa);
 	template < class SymbolType, class StateType >
diff --git a/aminimize2/makefile.conf b/aminimize2/makefile.conf
index 5c778a70d81b868792d483875ad77ecd79f00f66..b5072e4ce97661c49b5dd11ee10f9d02ad3af8c4 100644
--- a/aminimize2/makefile.conf
+++ b/aminimize2/makefile.conf
@@ -1,4 +1,4 @@
 EXECUTABLE:=aminimize2
-LINK_PATHS=../alib2elgo/ ../alib2algo/ ../alib2data/ ../alib2common/ ../alib2std/
-LINK_LIBRARIES=alib2elgo alib2algo alib2data alib2common alib2std xml2
-INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2elgo/src/ \$$(SOURCES_BASE_DIR)/../../alib2algo/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/
+LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2data/ ../alib2common/ ../alib2std/
+LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2data alib2common alib2std xml2
+INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2elgo/src/ \$$(SOURCES_BASE_DIR)/../../alib2algo/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/
diff --git a/aminimize2/src/aminimize.cpp b/aminimize2/src/aminimize.cpp
index ba95aa1d384bb4b157c11e790ddc712333d3585a..84a7ebf8794ffdf094c82c1c286e74afd81e7eed 100644
--- a/aminimize2/src/aminimize.cpp
+++ b/aminimize2/src/aminimize.cpp
@@ -8,13 +8,10 @@
 #include <tclap/CmdLine.h>
 #include <global/GlobalData.h>
 #include <measure>
-#include <sax/FromXMLParserHelper.h>
 
 #include <exception/CommonException.h>
-#include <factory/XmlDataFactory.hpp>
-
-#include "automaton/simplify/Minimize.h"
-#include "automaton/simplify/MinimizeBrzozowski.h"
+#include <lexer/Lexer.h>
+#include <parser/Parser.h>
 
 int main(int argc, char** argv) {
 	try {
@@ -44,32 +41,35 @@ int main(int argc, char** argv) {
 		if(measure.isSet())
 			common::GlobalData::measure = true;
 
+		cli::Environment environment;
+		environment.setBinding ( "stdin", input.getValue ( ) );
+		environment.setBinding ( "stdout", "-" );
+
 		measurements::start("Overal", measurements::Type::OVERALL);
 		measurements::start("Input read", measurements::Type::AUXILIARY);
 
-		automaton::Automaton automaton = alib::XmlDataFactory::fromTokens (sax::FromXMLParserHelper::parseInput(input));
+		cli::Parser parser ( cli::Lexer ( "execute <#stdin > $inputAutomaton" ) );
+		parser.parse ( )->run ( environment );
 
 		measurements::end();
 		measurements::start("Algorithm", measurements::Type::MAIN);
 
 		if(algorithm.getValue() == "hopcroft") {
-			automaton::Automaton res = automaton::simplify::Minimize::minimize(automaton);
-
-			measurements::end();
-			measurements::start("Output write", measurements::Type::AUXILIARY);
-
-			alib::XmlDataFactory::toStdout(res);
+			parser = cli::Parser ( cli::Lexer ( "execute automaton::simplify::Minimize $inputAutomaton > $outputAutomaton" ) );
 		} else if(algorithm.getValue() == "brzozowski") {
-			automaton::Automaton res = automaton::simplify::MinimizeBrzozowski::minimize(automaton);
-
-			measurements::end();
-			measurements::start("Output write", measurements::Type::AUXILIARY);
-
-			alib::XmlDataFactory::toStdout(res);
+			parser = cli::Parser ( cli::Lexer ( "execute automaton::simplify::MinimizeBrzozowski $inputAutomaton > $outputAutomaton" ) );
 		} else {
 			throw exception::CommonException("Unknown algorithm selected.");
 		}
 
+		parser.parse ( )->run ( environment );
+
+		measurements::end();
+		measurements::start("Output write", measurements::Type::AUXILIARY);
+
+		parser = cli::Parser ( cli::Lexer ( "execute $outputAutomaton >#stdout" ) );
+		parser.parse ( )->run ( environment );
+
 		measurements::end();
 		measurements::end();