refactored filtering for using defaultdicts and generators
refactored filtering for using defaultdicts and generators

fcurella/django-recommends,python-recsys/django-recommends,fcurella/django-recommends,Eksmo/django-recommends,Eksmo/django-recommends,python-recsys/django-recommends