Added filter_itemsets and refactoring