Refactored the chat controller to not be a singleton.