Allow a low-level api Filter object to be specified when querying.
Add test to validate error msg when querying for unregistered type.
Lots of random stuff suggested by intellij

Uses diamond operator.
Made lots of stuff private.
Squashed a lot of warnings.
Added simple test of indexing something not indexible
Bump pom to 5.0