FAR regex engine

+ reduced memory usage and some refactoring