Moved SSL stuff to separate file.
Added code to trap SIGINT.
Added message queue