Add run tests.

Also found and fixed a few bugs in the parser.