Move socket requires into sockets file