added socket set up code in node classes
fixed merge conflicts