Cleanups in filter.c