initial server and UI code