Added some tests to the Grammar class and corrected small typos in the
comments.