Updated grammar. Imlemented some tests