Clean up NLP code for production.