Small improvements to grammar based on rule profiling