Compiles on linux. Various little fixes.
Little fixes to server connection code.