Code cleanup in ServerMain.pas

Also minor cosmetic change to build.bat to make it more obvious
if the build was successful or not.
More code cleanup in ServerMain.pas