Added sequence indexing and fixed a few grammar defined incorrectly