[refactor] prechange for the text quality algoritme
[fix] cleanup bad code and speedup the fase-1 text algortime