Removed support for recursive filtering, since it was not needed an confusing.
Removed expected prefix in tests
Replacing instanceOf with pattern matching