Numerous bug fixes and a couple syntactic extensions