replaced a base object class which provides functions with a function in functions.db to query the database (and close it when it's done)