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

Also implements simple date parsing