tightened up clean_text code, which was having unexpected output