Reincluding declaration of socket in index, per Alex's request.