Minor modification of server code to make it slightly wordier but more comprehensible