More grammar and API definitions, based on Evan's API.