Update grammer to class-based syntax