break out wkt/json grammars into separate libraries