fixed a bug causing intersection filters to be way too conservative, added unit tests and refactored the code.