Cleaned up database query methods

The all of the overloaded query methods were tested, and should be good
to go.