Updated some more functions to use the new query function and converted bootstrap.inc to also use the query function