Reconnectinon + fixup

Now client can reconnect.
Header was added. [Added python2, but program works with python3 too].
Correct SIGTERM and SIGINT listeners were added.