Tests that identify current flaws with attribute annotator.

Refactored database creation and querying.