Added undoredostatechangedevent, moved the socket message from textinsertedevent, added events and checks for nulls to campfire socket listener