Updated server/client code