Finished main server, need to check and test.