Added toClientJSON to match. Outputs state data for rendering on the client side.