Cleaned up search implementation of filters.