Parser fixes and new tests