Completed assignment D4

This includes updates in the parser and some example test cases