finished grammar, fixed remaining bugs