fix socket.io hard direct in incidents.js

Also some house cleaning.