clean up of grammar rules