few small js fix, moved socketio to layout