Server and client code for Sugar Network