Improved parser (which fixed at least one bug) and fixed a broken test.