Changed command saving, added new commands

Also added a lot to the math capabilities