Fixed a bug at mathematica graph. Added some comments.