diff --git a/aconversions/src/fa2re/StateElimination.cpp b/aconversions/src/fa2re/StateElimination.cpp
index b58f104ed2db02bffd325e6d8dbfac62b2d2249c..90535ae132c5cd325a4e0039e826cbb24a15acfd 100644
--- a/aconversions/src/fa2re/StateElimination.cpp
+++ b/aconversions/src/fa2re/StateElimination.cpp
@@ -200,20 +200,14 @@ StateElimination::TransitionExtendedNFA::TransitionExtendedNFA( const State & fr
 
 }
 
-bool StateElimination::TransitionExtendedNFA::operator<( const StateElimination::TransitionExtendedNFA & rhs ) const
+bool StateElimination::TransitionExtendedNFA::operator<( const StateElimination::TransitionExtendedNFA & x ) const
 {
-    if( m_from.getName( ) < rhs.m_from.getName( ) )
-        return true;
-    if( m_from.getName( ) > rhs.m_from.getName( ) )
-        return false;
-
-    if( m_to.getName( ) < rhs.m_to.getName( ) )
-        return true;
-    if( m_to.getName( ) > rhs.m_to.getName( ) )
-        return false;
-
-    RegExpComparator cmp;
-    return cmp.compare( m_regexp, rhs.m_regexp ) == -1;
+    if( m_from != x.m_from )
+        return m_from < x.m_from;
+    else if( ! ( m_regexp == x.m_regexp ) )
+        return m_regexp < x.m_regexp;
+    else
+        return m_to < x.m_to;
 }
 
 } /* namespace conversions */
diff --git a/aconversions/src/fa2re/StateElimination.h b/aconversions/src/fa2re/StateElimination.h
index 8bb0945a6ba45f31446d1e3e427290901c74e205..e5d484477a43815ce465f38ce76b004bff94eb87 100644
--- a/aconversions/src/fa2re/StateElimination.h
+++ b/aconversions/src/fa2re/StateElimination.h
@@ -21,7 +21,6 @@
 #include <regexp/RegExpSymbol.h>
 
 #include "AbstractFAtoREConverter.h"
-#include "../re2fa/RegExpComparator.h"
 
 #include "RegExpOptimize.h"
 
diff --git a/aconversions/src/re2fa/Brzozowski.h b/aconversions/src/re2fa/Brzozowski.h
index 24b5057d052990f42afe88623f914d0a16584254..e8dd82a44737030af70d04432a5d5436eb4067c9 100644
--- a/aconversions/src/re2fa/Brzozowski.h
+++ b/aconversions/src/re2fa/Brzozowski.h
@@ -16,7 +16,6 @@
 #include <AlibException.h>
 
 #include "AbstractREtoFAConverter.h"
-#include "RegExpComparator.h"
 
 #include "RegExpDerivation.h"
 #include "RegExpAlphabet.h"
diff --git a/aconversions/src/re2fa/RegExpComparator.cpp b/aconversions/src/re2fa/RegExpComparator.cpp
deleted file mode 100644
index c693f56753a4acc95184bf5c5c67645d1793aa8e..0000000000000000000000000000000000000000
--- a/aconversions/src/re2fa/RegExpComparator.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * RegExpComparator.cpp
- *
- *  Created on: 5. 2. 2014
- *      Author: tomas
- */
-
-#include "RegExpComparator.h"
-
-using namespace alib;
-using namespace regexp;
-
-namespace conversions
-{
-
-RegExpComparator::RegExpComparator( void )
-{
-
-}
-
-bool RegExpComparator::operator() ( const RegExp & lhs, const RegExp & rhs ) //const
-{
-    RegExpElement * leftRoot = const_cast<RegExp&>( lhs ).getRegExp( );
-    RegExpElement * rightRoot = const_cast<RegExp&>( rhs ).getRegExp( );
-
-    return compare( leftRoot, rightRoot ) == -1;
-}
-
-int RegExpComparator::compare( RegExpElement * lhs, RegExpElement * rhs ) const
-{
-    Alternation* lhsAlt = dynamic_cast<Alternation*>( lhs ), *rhsAlt = dynamic_cast<Alternation*>( rhs );
-    Concatenation* lhsConcat = dynamic_cast<Concatenation*>( lhs ), *rhsConcat = dynamic_cast<Concatenation*>( rhs );
-    Iteration* lhsIter = dynamic_cast<Iteration*>( lhs ), *rhsIter = dynamic_cast<Iteration*>( rhs );
-    RegExpSymbol* lhsSymb = dynamic_cast<RegExpSymbol*>( lhs ), *rhsSymb = dynamic_cast<RegExpSymbol*>( rhs );
-    RegExpEmpty* lhsEmpty = dynamic_cast<RegExpEmpty*>( lhs ), *rhsEmpty = dynamic_cast<RegExpEmpty*>( rhs );
-    RegExpEpsilon* lhsEps = dynamic_cast<RegExpEpsilon*>( lhs ), *rhsEps = dynamic_cast<RegExpEpsilon*>( rhs );
-
-    if( ( lhsAlt && rhsAlt ) || ( lhsConcat && rhsConcat ) || ( lhsIter && rhsIter ) || ( lhsSymb && rhsSymb ) ||
-            ( lhsEmpty && rhsEmpty ) || ( lhsEps && rhsEps ) )
-    {
-        if( lhsAlt )
-            return compare( lhsAlt, rhsAlt );
-        if( lhsConcat )
-            return compare( lhsConcat, rhsConcat );
-        if( lhsIter )
-            return compare( lhsIter, rhsIter );
-        if( lhsSymb )
-            return compare( lhsSymb, rhsSymb );
-        if( lhsEmpty )
-            return compare( lhsEmpty, rhsEmpty );
-        if( lhsEps )
-            return compare( lhsEps, rhsEps );
-    }
-    else
-    {
-        NodeType leftNodeType = UNKNOWN, rightNodeType = UNKNOWN;
-
-        if( lhsAlt )    leftNodeType = ALTERNATION;
-        if( lhsConcat ) leftNodeType = CONCATENATION;
-        if( lhsIter )   leftNodeType = ITERATION;
-        if( lhsSymb )   leftNodeType = SYMBOL;
-        if( lhsEmpty )  leftNodeType = EMPTY;
-        if( lhsEps )    leftNodeType = EPSILON;
-
-        if( rhsAlt )    rightNodeType = ALTERNATION;
-        if( rhsConcat ) rightNodeType = CONCATENATION;
-        if( rhsIter )   rightNodeType = ITERATION;
-        if( rhsSymb )   rightNodeType = SYMBOL;
-        if( rhsEmpty )  rightNodeType = EMPTY;
-        if( rhsEps )    rightNodeType = EPSILON;
-
-        if ( leftNodeType < rightNodeType ) return -1;
-        if ( leftNodeType > rightNodeType ) return 1;
-        return 0;
-    }
-
-     throw AlibException( "RegExpComparator::compare - Don't know how to compare subtrees." );
-}
-
-int RegExpComparator::compare( Alternation * lhs, Alternation * rhs ) const
-{
-    auto lhsEnd = lhs->getElements( ).end( );
-    auto rhsEnd = rhs->getElements( ).end( );
-
-    for( auto lhsIt = lhs->getElements( ).begin( ), rhsIt = rhs->getElements( ).begin( ); ; lhsIt ++, rhsIt ++ )
-    {
-        if( lhsIt == lhsEnd && rhsIt != rhsEnd )
-            return -1;
-        if( lhsIt != lhsEnd && rhsIt == rhsEnd )
-            return 1;
-        if( lhsIt == lhsEnd && rhsIt == rhsEnd )
-            return 0;
-
-        int res = compare ( *lhsIt, *rhsIt );
-        if( res != 0 )
-            return res;
-    }
-
-    return 0;
-}
-
-int RegExpComparator::compare( Concatenation * lhs, Concatenation * rhs ) const
-{
-    auto lhsEnd = lhs->getElements( ).end( );
-    auto rhsEnd = rhs->getElements( ).end( );
-
-    for( auto lhsIt = lhs->getElements( ).begin( ), rhsIt = rhs->getElements( ).begin( ); ; lhsIt ++, rhsIt ++ )
-    {
-        if( lhsIt == lhsEnd && rhsIt != rhsEnd )
-            return -1;
-        if( lhsIt != lhsEnd && rhsIt == rhsEnd )
-            return 1;
-        if( lhsIt == lhsEnd && rhsIt == rhsEnd )
-            return 0;
-
-        int res = compare ( *lhsIt, *rhsIt );
-        if( res != 0 )
-            return res;
-    }
-
-    return 0;
-}
-
-int RegExpComparator::compare( Iteration * lhs, Iteration * rhs ) const
-{
-    return compare( lhs->getElement( ), rhs->getElement( ) );
-}
-
-int RegExpComparator::compare( RegExpSymbol * lhs, RegExpSymbol * rhs ) const
-{
-    if( lhs->getSymbol( ) < rhs->getSymbol( ) )
-        return -1;
-    if( lhs->getSymbol( ) > rhs->getSymbol( ) )
-        return 1;
-    return 0;
-}
-
-int RegExpComparator::compare( RegExpEmpty * lhs, RegExpEmpty * rhs ) const
-{
-    return 0;
-}
-
-int RegExpComparator::compare( RegExpEpsilon * lhs, RegExpEpsilon * rhs ) const
-{
-    return 0;
-}
-
-} /* namespace conversions */
diff --git a/aconversions/src/re2fa/RegExpComparator.h b/aconversions/src/re2fa/RegExpComparator.h
deleted file mode 100644
index 76e8023d137b4bfdde94d577674aa14e201744c8..0000000000000000000000000000000000000000
--- a/aconversions/src/re2fa/RegExpComparator.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * RegExpComparator.h
- *
- *  Created on: 5. 2. 2014
- *      Author: tomas
- */
-
-#ifndef REGEXPCOMPARATOR_H_
-#define REGEXPCOMPARATOR_H_
-
-#include <map>
-#include <string>
-
-#include <regexp/RegExp.h>
-#include <regexp/RegExpElement.h>
-#include <regexp/Alternation.h>
-#include <regexp/Concatenation.h>
-#include <regexp/Iteration.h>
-#include <regexp/RegExpSymbol.h>
-#include <regexp/RegExpEmpty.h>
-#include <regexp/RegExpEpsilon.h>
-#include <AlibException.h>
-
-namespace conversions
-{
-
-class RegExpComparator
-{
-public:
-    RegExpComparator( void );
-    bool operator() ( const regexp::RegExp & lhs, const regexp::RegExp & rhs ); //const;
-    int compare( regexp::RegExpElement * lhs, regexp::RegExpElement * rhs ) const;
-
-private:
-    int compare( regexp::Alternation * lhs, regexp::Alternation * rhs ) const;
-    int compare( regexp::Concatenation * lhs, regexp::Concatenation * rhs ) const;
-    int compare( regexp::Iteration * lhs, regexp::Iteration * rhs ) const;
-    int compare( regexp::RegExpSymbol * lhs, regexp::RegExpSymbol * rhs ) const;
-    int compare( regexp::RegExpEmpty * lhs, regexp::RegExpEmpty * rhs ) const;
-    int compare( regexp::RegExpEpsilon * lhs, regexp::RegExpEpsilon * rhs ) const;
-
-    enum NodeType {
-        UNKNOWN = 0,
-        ALTERNATION = 1,
-        CONCATENATION = 2,
-        ITERATION = 3,
-        SYMBOL = 4,
-        EMPTY = 5,
-        EPSILON = 6
-    };
-};
-
-} /* namespace conversions */
-
-#endif /* REGEXPCOMPARATOR_H_ */