Refactoring of the text APIs. Removed the examples from the matching analyzer because they didn't work. I kept the logic of the matching analyzer intact, removing dead code and optimizing it, but the logic itself needs some reviewing and documentation because I'm not sure it's correct.