And now fixes to Python 3. Filter now returns generator, not raw list as in Python 2.