Parsing bug fixes, more tests.