Added very clumsy MathDoc support until I can learn regex a bit more. Added minimal documentation.