Remove reduce/reduce conflicts and useless rules.