Locus filtering refactored, tested