Merge preliminary Server code from working branch