cleaning up, starting work on supporting wildcard queries