Updated server and example client to use encoding layer.