Updated doc and some figure gen code.