Added missing toString tests.
Refined typing in parser.