Add socket helpers back in. Reorganize structure of protocol code directories.