Implemneted a generic tcp server.
Put signal functions into a separate file.
Added tcp_server and signals.