Made filters much faster by using the database.