Modularised the grammar filtering parts. Each filter has their own method