Implemented category filtering.