cleaned up server a bit.
move js code out to its own file. fetch socket.io from a cdn.