fix more parser bugs
fix some more bugs and add tests