Filter for doubles at start instead of afterwards
And more tests