Updated text preprocessor