Update grammar to compile as LL(1), fixed few bugs