class and grammar fixes