added cool stuff

added license note
added function to catch SIGTERM
added reconnection mechanism in case the connection gets lost