upgrades; add mathematica mode (experimental)