Added code for logging, daemonising, and the initial UDP socket server.