Consolidated contents of common.go into server.go