Big update to server script.