Changed messaging protocol to use JSON strings