Catch the exceptions
Use the proper part of the command string
Make calc actually work
Add tests for calc