simplified grammar; added new tests/examples