Tidy grammar and actions
Add parser actions