Changed client-server comm code