Get parser working and add some test cases for it.