Changes to divernet data filtering, some refactoring.