Started splitting common functionality for filterhits out and thinking about tests.