Wrote tests for filterhits common code so far and got them to pass.