Cleanups. Comments. Remove debugging code from filter()