cleanup grammar class
fix structure... some tests not passing here