adding closing sockets and stop threads.
Adding exit_button