Added statistics generation on the client side.