fixes and adding socketio
merged