Initial split of server and main, with server constructor test