starting to clean up the chat provider code