Implemented disconnect.

By going to None state, the program exits.