don't use global variables
global static variables like
chatty_data are pretty much broken. As each instance of chatty get different variables, the changes made to them are not available for the newly created instances. It might be better to pack them into some
ChattyApplication or so which is unique for the application and shared with every instance.
In long term, we should hide those variables to something else and provide an abstraction around it, so that its users won't have direct access to it.