Refactor filtering logic
Support for $elemMatch (#39)