fix typos with inline math.  Fix bug in Prims algorithm.
fixes #335