Major bug fixes

The following issues were addressed:
1.) Fixed a bug that was mangling Unicode characters while removing
punctuation
2.) Fixed a bug where the chatbot's debug level wasn't being used
3.) re-wrote several functions to be more efficient