Updated with some experiments concerning sockets and starting an external program.