improvements to equation handling
Merge pull request #72 from oreillymedia/sarah

improvements to equation handling