Start supporting multiple servers

Server is currently crashing with a call stack size exceeded error
Fix call stack crash
Move js into separate file, add support for connecting to arbitrary
servers
Merge pull request #1 from tom95/multiserver

Multiserver support