More work on sockets, cleaned up actions