Refactor Main.hs using ExceptT
Postprocess the Document

For the moment, just a simple pass to fix the outer spaces in math formulas.