Updated/Finished server (not tested)