Added some query functions to the Database module