Deleted unused code, added closing chat window on server shutdown